Open vlahanas opened 7 years ago
Hi, Can you elaborate on what you want to achieve ? I don't think there is a build-in solution but we can help you build what you want.
Hello, thanks for the response. I am using two datepickers, each embedded in a separate div, and i wanted to make them work as a single daterange picker in terms of behavior.
Anyway, i managed to achieve this by manually setting 'startDate', 'endDate' within the two pickers 'changeDate' callbacks. Moreover, i am using the beforeShowDay option using css classes to change the appearance of dates lying within the selected range between the selected dates of the two pickers.
BTW, i think there is a possible bug when setting the startDate of a datepicker after initialization.
Using
element.datepicker('setStartDate', ... );
sometimes makes the datepicker to lose focus of its selected date.
However, using the same command like this:
element.data('datepicker').setStartDate(...);
always works perfectly.
You could also use beforeShowDay
to set start and end dates.
See this example https://jsfiddle.net/uz65z29o/6/
Is it possible on the current version 1.6.1 or the development version, to have the daterange picker mode embedded (inline) format?