I have 2 inline calendars. When I select a date from the dtFrm calendar it sets the date on the dtTo calendar as expected. I just cant seem to set the EndDate of the dtTo calendar.
Anyone manage to solve this one?
using:jquery.datePicker.min-2.1开发者_C百科.2.js
<script type="text/javascript">
$(function() {
$('.dtFrm').datePicker({ inline: true })
.bind(
'dateSelected',
function(e, selectedDate, $td) {
$('.dtTo').dpSetSelected(selectedDate.addDays(10).asString());//works
$('.dtTo').dpSetEndDate(selectedDate.addDays(11).asString());//doesnt work
}
);
$('.dtTo').datePicker({ inline: true });
});
</script>
<div class="dtFrm" style="float:left"></div>
<div class="dtTo" style="float:left"></div>
Have you seen my example showing how to do this? You can find it here:
http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerStartEnd.html
I'm not sure why this isn't working in your case. I notice you say you are using jquery.datePicker.min-2.1.2.js - this is actually very old code (although it is the latest release) - please grab the latest code from my website or svn.
精彩评论