This question is locked. New answers and comments are not allowed.
Hi,
I would like to know if it is possible to enter different dates using javascipt.
this is in a template in a gridview shown OnEdit()
@(Html.Telerik().DateTimePickerFor(item => item.DateTimeStart)
.Name(ViewData.TemplateInfo.GetFullHtmlFieldName("DateTimeStart")))
function OnEdit()
if (e.mode == "insert") {
var datepicker = $('#DateTimeStart').data("tDateTimePicker");
datepicker.value("11/05/2012"); //this is going to be the value that I will set later on
}
if (e.mode == "edit") {
var datepicker = $('#DateTimeStart').data("tDateTimePicker");
bookDateTime = dataItem["DateTimeStart"];
datepicker.value(bookDateTime);
alert(bookDateTime)
}
It is working properly but the value in the datepicker is not updated when you open it at the first time. The second time I Open it, it works properly. I don't know what can be the problem. Can you please help me to figure out since its my first time to post here
I would like to know if it is possible to enter different dates using javascipt.
this is in a template in a gridview shown OnEdit()
@(Html.Telerik().DateTimePickerFor(item => item.DateTimeStart)
.Name(ViewData.TemplateInfo.GetFullHtmlFieldName("DateTimeStart")))
function OnEdit()
if (e.mode == "insert") {
var datepicker = $('#DateTimeStart').data("tDateTimePicker");
datepicker.value("11/05/2012"); //this is going to be the value that I will set later on
}
if (e.mode == "edit") {
var datepicker = $('#DateTimeStart').data("tDateTimePicker");
bookDateTime = dataItem["DateTimeStart"];
datepicker.value(bookDateTime);
alert(bookDateTime)
}
It is working properly but the value in the datepicker is not updated when you open it at the first time. The second time I Open it, it works properly. I don't know what can be the problem. Can you please help me to figure out since its my first time to post here