value

Gets/Sets the value of the DateInput.

Parameters

value Date|String

The value to set.

Returns

Date The value of the DateInput.

  • This method does not trigger change event. This can affect MVVM value binding. The model bound to the widget will not be updated. You can overcome this behavior trigerring the change event manually using trigger("change") method.
<input id="dateinput" />
<script>
$("#dateinput").kendoDateInput();

var dateinput = $("#dateinput").data("kendoDateInput");
dateinput.value(new Date(2016, 10, 1));
dateinput.trigger("change");
</script>

Example - gets the value of the widget

<input id="dateinput" />
<script>
$("#dateinput").kendoDateInput({
    value: new Date(2013, 10, 10)
});

var dateinput = $("#dateinput").data("kendoDateInput");

var value = dateinput.value();
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(value);
</script>

Example - sets the value of the widget

<input id="dateinput" />
<script>
$("#dateinput").kendoDateInput({
    value: new Date(2013, 10, 10)
});

var dateinput = $("#dateinput").data("kendoDateInput");

dateinput.value(new Date());
</script>
In this article