I've been working with this DateTimePicker library. I need to catch the value of the date when I click on it and then pass it to the input's value, or just catch the value because the input works with a submit()
onChange.
The library has a full code list but I don't use javascript language, I'm more used to PHP, so I don't know how to do it.
<input type="datetime" name="datetimepicker" id="datetimepicker" onChange="submit()" value="here I need to put the picked date">
jQuery.datetimepicker.setLocale('es');
$('#datetimepicker').datetimepicker({
inline: true,
parentID: '#datetimepicker',
minDate: (0),
dayOfWeekStart: (1),
timepicker: false,
disabledWeekDays: [0,
<?php echo $reserva['lunes']; ?>,
<?php echo $reserva['martes']; ?>,
<?php echo $reserva['miercoles']; ?>,
<?php echo $reserva['jueves']; ?>,
<?php echo $reserva['viernes']; ?>,
<?php echo $reserva['sabado']; ?>],
disabledDates: ['2019-07-23'],
formatDate:'Y-m-d',
format: 'Y-m-d H:i',
formatTime: 'H:i',
minTime: '8:00',
maxTime: '21:00',
step: (60),
allowBlank: false,
});