or
.ParseFormats(new[] {"MM/yyyy", "MM yyyy"})
the DateTime object in the browser doesn't have a day to assign, so it assumes the first of the month. When you leave the field, the function simply compares the old value to the new one, sees that the old day (the 10th) is different from the new day (the 1st) and changes the value, which bubbles back to the DataSource, and tells the Grid the data has changed.transport: {
read: {
url: "/Inspection/SupervisorChartData/",
dataType: "json"
}
},
<
div
id
=
"example"
class
=
"k-content"
>
<
div
class
=
"chart-wrapper"
>
<
div
id
=
"chart"
></
div
>
</
div
>
<
script
>
function createChart() {
$("#chart").kendoChart({
title: {
text: "Olympic Medals won by USA"
},
legend: {
visible: false
},
seriesDefaults: {
type: "bar",
stack: true
},
series: [{
name: "Gold Medals",
data: [40, 32, 34, 36, 45, 33, 34, 83, 36, 37, 44, 37, 35, 36, 46],
color: "#f3ac32"
}, {
name: "Silver Medals",
data: [19, 25, 21, 26, 28, 31, 35, 60, 31, 34, 32, 24, 40, 38, 29],
color: "#b8b8b8"
}, {
name: "Bronze Medals",
data: [17, 17, 16, 28, 34, 30, 25, 30, 27, 37, 25, 33, 26, 36, 29],
color: "#bb6e36"
}],
valueAxis: {
max: 180,
line: {
visible: false
},
minorGridLines: {
visible: true
}
},
categoryAxis: {
categories: [1952, 1956, 1960, 1964, 1968, 1972, 1976, 1984, 1988, 1992, 1996, 2000, 2004, 2008, 2012],
majorGridLines: {
visible: false
}
},
});
}
$(document).ready(function() {
setTimeout(function() {
createChart();
}, 400);
});
</
script
>
</
div
>
<
div
data-role
=
"view"
id
=
"share"
data-layout
=
"default"
class
=
"share-view"
data-init
=
"app.viewModels.editYFKey.init"
data-show
=
"app.viewModels.editYFKey.show"
data-model
=
"app.viewModels.editYFKey"
>
<
header
data-role
=
"header"
>...
</
header
>
<
div
id
=
"enterStatus"
class
=
"user-status-wrp"
style
=
"background-color: white; height:100%;"
>
<
div
class
=
"user-share"
style
=
"width:100%;"
>
<
span
id
=
"YFKeyEdit_NameLabel"
style
=
"width: 98%; text-align: center;"
><
b
>Name:</
b
></
span
><
br
/>
<
input
id
=
"YFKeyEdit_Name"
placeholder
=
"Enter a brief name for the key area here"
style
=
"width:99%;"
required
validationMessage
=
"The name for this key must be given!"
/>
<
div
id
=
"newCommentValidation"
class
=
"validation"
>The name is required!</
div
>
</
div
>
<
div
class
=
"user-share"
style
=
"width:100%;"
>
<
span
id
=
"YFKeyEdit_IntentionsLabel"
style
=
"width: 100%; text-align: center;"
><
b
>Intentions:</
b
></
span
>
<
a
class
=
"nav-button"
data-align
=
"right"
data-role
=
"button"
onclick
=
"AddIntention"
>Add</
a
>
<
span
id
=
"editYFKeyIntentions"
>
<
ul
>
<
li
>test1</
li
>
<
li
>test2</
li
>
<
li
>test3</
li
>
<
li
>test4</
li
>
</
ul
>
</
span
>
</
div
>
<
div
class
=
"user-share"
style
=
"width:100%;"
>
<
span
id
=
"YFKeyEdit_DescriptionLabel"
style
=
"width: 100%; text-align: center;"
><
b
>Description:</
b
></
span
><
br
/>
<
span
class
=
"txtarea-wrp"
>
<
textarea
id
=
"YFKeyEdit_Description"
rows
=
"3"
placeholder
=
"Enter a description for the key area here"
style
=
"width:99%; resize: none;"
required
validationMessage
=
"The name for this key must be given!"
/>
</
span
>
<
div
id
=
"newCommentValidation"
class
=
"validation"
>The name is required!</
div
>
</
div
>
</
div
>
</
div
>
<
div
data-role
=
"view"
id
=
"share"
data-layout
=
"default"
class
=
"share-view"
data-init
=
"app.viewModels.editYFKey.init"
data-show
=
"app.viewModels.editYFKey.show"
data-model
=
"app.viewModels.editYFKey"
>
<
header
data-role
=
"header"
>...
</
header
>
<
div
id
=
"enterStatus"
class
=
"user-status-wrp"
style
=
"background-color: white; height:100%;"
>
<
div
class
=
"user-share"
style
=
"width:100%;"
>
<
span
id
=
"YFKeyEdit_NameLabel"
style
=
"width: 98%; text-align: center;"
><
b
>Name:</
b
></
span
><
br
/>
<
input
id
=
"YFKeyEdit_Name"
placeholder
=
"Enter a brief name for the key area here"
style
=
"width:99%;"
required
validationMessage
=
"The name for this key must be given!"
/>
<
div
id
=
"newCommentValidation"
class
=
"validation"
>The name is required!</
div
>
</
div
>
<
div
class
=
"user-share"
style
=
"width:100%;"
>
<
span
id
=
"YFKeyEdit_DescriptionLabel"
style
=
"width: 100%; text-align: center;"
><
b
>Description:</
b
></
span
><
br
/>
<
span
class
=
"txtarea-wrp"
>
<
textarea
id
=
"YFKeyEdit_Description"
rows
=
"3"
placeholder
=
"Enter a description for the key area here"
style
=
"width:99%; resize: none;"
required
validationMessage
=
"The name for this key must be given!"
/>
</
span
>
<
div
id
=
"newCommentValidation"
class
=
"validation"
>The name is required!</
div
>
</
div
>
<
div
class
=
"user-share"
style
=
"width:100%;"
>
<
span
id
=
"YFKeyEdit_IntentionsLabel"
style
=
"width: 100%; text-align: center;"
><
b
>Intentions:</
b
></
span
>
<
a
class
=
"nav-button"
data-align
=
"right"
data-role
=
"button"
onclick
=
"AddIntention"
>Add</
a
>
<
span
id
=
"editYFKeyIntentions"
>
<
ul
>
<
li
>test1</
li
>
<
li
>test2</
li
>
<
li
>test3</
li
>
<
li
>test4</
li
>
</
ul
>
</
span
>
</
div
>
</
div
>
</
div
>