I am trying to use a php date variable with Pikaday but not having much luck.
PHP Date:
$creation_date = date("d/m/Y", strtotime($rows['creation_date']));
Pikaday code:
startPicker = new Pikaday({
field: document.getElementById('task_start_date'),
format: 'DD/MM/YYYY',
minDate: <?php echo $creation_date; ?>,
onSelect: function() {
startDate = this.getDate();
updateStartDate();
}
})
I am guessing I need to format the date? And I think the months need to be altered so that January is 00, February is 01 etc but not 100% sure.