parmarmayur9090 / jquery-datepicker

Automatically exported from code.google.com/p/jquery-datepicker
0 stars 0 forks source link

2 inline calendars - i need to set EndDate of 2nd calendar on selecting date from 1st calendar #216

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I'm stuck. Tried all the angles but i cant seem to get it working. 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.

assoc stackoverflow entry: 
http://stackoverflow.com/questions/3046174/kelvinluck-jquery-datepicker-2-inline
-calendars-i-need-to-set-enddate-of-2nd-o

Is it a bug? Please see extract below:

    using:jquery.datePicker.min-2.1.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>

Original issue reported on code.google.com by mrla...@gmail.com on 15 Jun 2010 at 2:41

GoogleCodeExporter commented 8 years ago
Answered on stack overflow - that is a better place for support requests.

Original comment by kelvin.l...@gmail.com on 15 Jun 2010 at 2:54