I have requirement where application has to support the following formats, but DatePicker is not supporting the formats.
$("#sampleDate").kendoDatePicker({
format: "MM/dd/yyyy",
parseFormats: ["Mddyyyy", "Mddyy", "MM/dd/00y", "MM/d/00y", "M/dd/00y", "M/d/00y"]
});
Can someone help with this!
Thanks,
Nishad
4 Answers, 1 is accepted
Strings which are formatted like "Mddyyyy" are really hard to parse and currently are not supported by kendo.parseDate. Nevertheless dates, like "MMddyyyy" are fully supported.
Parsing formats, like "Mddyyyy", which merge months and days are hard to be parsed correctly and currently are not supported. Nevertheless, I believe that other formats are supported. Please note that "0" is not valid specifier.
Georgi Krustev
the Telerik team

$("#sampleDate").kendoDatePicker({
format: "MM/dd/yyyy",
parseFormats: ["yy", "Mdy", "Mdyy", "Mddyy", "MMddyy", "Mddyyyy","MMddyyyy", "MM/dd/yyyy", "MM/d/yy", "M/dd/yy", "M/d/yy"]
});
12 uses "yy" and becomes 01/01/2012
123 uses "Mdy" and becomes 01/02/2003
1234 uses "Mdyy" and becomes 01/02/2034
12345 uses "Mddyy" and becomes 01/23/2045
121234 uses "MMddyy" and becomes 12/12/2034
1232013 uses "Mddyyyy" and becomes 1/23/2013
03122013 uses "MMddyyyy" and becomes 03/12/2013
Thanks,
Mike

Kendo Date picker,
The following code should restrict the kendo datepicker to accept any format other than MM/dd/yyyy
$("#date").kendoDatePicker({
format: "MM/dd/yyyy", parseFormats: ["MM/dd/yyyy"]
}).data("kendoDatePicker");
if user manually types yyyy/dd/MM format it gets converted into MM/dd/yyyy rather than kendo validator raising input validation error.
Is there any setting on the kendodatepicker control which can raise invalid dateformat error?
Hello Kamal,
In general, the widget will not accept "yyyy/dd/MM" value as valid Date, when parseFormats has different format value. This Dojo demo proves that statement:
- http://dojo.telerik.com/orUGi
Here is a screencast that I took during the test:
- http://screencast.com/t/s0uZO7xH2
Could you let me know what I am missing something?
Regards,
Telerik