In the following code, the button is wired to parse the value of the datepicker when clicked. It works fine until I try to enter the name of the month e.g. 15 juli 2015 will be converted to 2014-07-15. This means that the month and year are parsed correctly, whilst the year is not. The culture in this case is set to NL, but this also fails when using en-US with the date value July 15 2015.
<!DOCTYPE html>
<
html
>
<
head
>
<
style
>html { font-size: 12px; font-family: Arial, Helvetica, sans-serif; }</
style
>
<
title
></
title
>
<
link
href
=
"http://cdn.kendostatic.com/2014.1.416/styles/kendo.common.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"http://cdn.kendostatic.com/2014.1.416/styles/kendo.default.min.css"
rel
=
"stylesheet"
/>
<
script
src
=
"http://cdn.kendostatic.com/2014.1.416/js/jquery.min.js"
></
script
>
<
script
src
=
"http://cdn.kendostatic.com/2014.1.416/js/kendo.all.min.js"
></
script
>
<
script
src
=
"http://cdn.kendostatic.com/2014.1.416/js/cultures/kendo.culture.nl-NL.min.js"
></
script
>
</
head
>
<
body
>
<
div
id
=
"example"
class
=
"k-content"
>
<
div
id
=
"email-settings"
>
<
div
style
=
"margin-top: -6px; margin-left: 180px"
>
<
input
id
=
"datepicker"
value
=
"10/10/2011"
style
=
"width:150px;"
/>
</
div
>
<
div
><
button
onclick
=
"alert(kendo.parseDate($('#datepicker').val()));"
>Test</
button
></
div
>
</
div
>
<
script
>
$(document).ready(function() {
kendo.culture("nl-NL");
// create DatePicker from input HTML element
$("#datepicker").kendoDatePicker();
$("#monthpicker").kendoDatePicker({
// defines the start view
start: "year",
// defines when the calendar should return date
depth: "year",
// display month and year in the input
format: "MMMM yyyy"
});
});
</
script
>
<
style
scoped>
#example h2 {
font-weight: normal;
}
#email-settings {
width: 395px;
margin: 30px auto;
padding: 110px 0 0 30px;
background: url('../../content/web/datepicker/mailSettings.png') transparent no-repeat 0 0;
}
</
style
>
</
div
>
</
body
>
</
html
>