This is a migrated thread and some comments may be shown as answers.

Two date pickers: the first one jumping around

1 Answer 119 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Marcus
Top achievements
Rank 1
Marcus asked on 11 Nov 2011, 02:33 AM

Two datepickers on the same site

If I try to nitialize both with values the first one cant do it. I try to set January of the current year but he every time placed the February and if I select January he jump to December (previous year) !

The same jumoing happens if I select one in the first date picker and click into the second, than the first date picke jumps to december (prev year)?

some code :

var myDate = new Date();
$(document).ready(function() {
 
    $("#datepickerF").kendoDatePicker({
      value: new Date(myDate.getFullYear(), 1, 1),
      
                        // defines the start view
                        startView: "year",

                        // defines when the calendar should return date
                        depth: "year",

                        // display month and year in the input
                        format: "MMMM yyyy",
      change: function(){return false;}
      
                    });
 $("#datepickerT").kendoDatePicker({
                        value: myDate,
      
      // defines the start view
                        startView: "year",

                        // defines when the calendar should return date
                        depth: "year",

                        // display month and year in the input
                        format: "MMMM yyyy",
      change: function(){return false;}
                    });

});

and
<input id="datepickerF" value=""/>
<input id="datepickerT" value=""/>

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 11 Nov 2011, 10:24 AM
Marcus,

I just answered your question in the other forum thread that you started. To avoid confusion, lets continue the discussion in the original thread.

Regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Date/Time Pickers
Asked by
Marcus
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or