Edit this page

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 could 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();
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>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy