4

Is it possible to pair two date pickers but still allow selection 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 datepicker still disables selection of start and end date being the same day.

Mahesh
  • 872
  • 1
  • 10
  • 25

2 Answers2

3

Try this

$('#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

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

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

It works just fine on my project.

pridemw
  • 31
  • 1
  • 4