Start and end date on the same day Zebra DatePicker

Is it possible to combine the two date selections, but still allow the choice of the same day.

    $('#depart, #departc, #depart_modify').Zebra_DatePicker({
        format: 'd/m/Y',
        selectWeek: true,
        inline: true,
        pair: $('#return, #returnc'),
        firstDay: 1
    });

    $('#return, #returnc, #depart_review').Zebra_DatePicker({
        format: 'd/m/Y',
        selectWeek: true,
        direction: 0
    });

but the end of the datepicker still disables the selection of the start and end dates on the same day.

+4
source share
2 answers

try it

$('#depart, #departc, #depart_modify').Zebra_DatePicker({
    format: 'd/m/Y',
    selectWeek: true,
    inline: true,
    pair: $('#return, #returnc'),
    firstDay: 1,
    direction: true // add this line
});

$('#return, #returnc, #depart_review').Zebra_DatePicker({
    format: 'd/m/Y',
    selectWeek: true,
    direction: true // change 0 to true
});
+2
source

If you are php, you can call the current date function like this

$('#to').Zebra_DatePicker({
               direction: [true,'<?php echo date("Y-m-d")?>'],
Run codeHide result

It works great in my project.

+2
source

All Articles