Mahesh Mahesh - 1 year ago 135
Javascript Question

Start and end date being the same day of Zebra DatePicker

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.

Answer Source

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
});
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download