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

Cant set datepicker to january!

5 Answers 197 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:40 AM
Two datepickers one the same page. Every time i try to set the first one to Jabuary it's jumping to the previous december:
<input id="datepickerF" value="" style="width:150px;">
<input id="datepickerT" value="" style="width:150px;">


$(document).ready(function() {

 $("#datepickerF").kendoDatePicker({
            
                        // 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",
          
                    });
 $("#datepickerT").kendoDatePicker({
                
      // 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",
                        });
    });



Marcus



5 Answers, 1 is accepted

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

 
This is a known issue and the problem is related with the date parsing. The good news is that the issue is already addressed and the fix will be included in the official release of KendoUI.

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!
0
Marcus
Top achievements
Rank 1
answered on 11 Nov 2011, 06:38 PM
OK that's great. However I need this fix now ...
Is this possible ?
(in the worst case give a pointer into the code and I fix it local at my computer)

Is this maybe possible?

Thank you
Marcus

(I have no solution for this today I must kick out kendoui here ... and I don't want to do this...
so please help in this point)

0
Marcus
Top achievements
Rank 1
answered on 12 Nov 2011, 02:04 AM
Please give me a short pointer into the code ... which file? ... where is the data parsing ...?


Thank you very much
Marcus
0
Georgi Krustev
Telerik team
answered on 16 Nov 2011, 04:24 PM
Hi Marcus,

 
The fix is in the parseExact method, before last return you will need to add this line of code:

if (day === null) {
            day = 1;
}
The fix will be available in the next official release of KendoUI scheduled for the end of November.

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!
0
Marcus
Top achievements
Rank 1
answered on 24 Nov 2011, 11:57 PM
OK Thank you ...
Tags
Date/Time Pickers
Asked by
Marcus
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Marcus
Top achievements
Rank 1
Share this question
or