As we know that we set the default start day of the week for calendar in kendo date time picker, is there any way we can set the default time in kendo date time picker?
If we use
value: new Date()
this will set the field with current date and time, but what I want is that, only the time picker in datetime picker should be defaulted to 9:00 AM which is by default 12:00 AM.
As we know that we set the default start day of the week for calendar in kendo date time picker, is there any way we can set the default time in kendo date time picker?
If we use
value: new Date()
this will set the field with current date and time, but what I want is that, only the time picker in datetime picker should be defaulted to 9:00 AM which is by default 12:00 AM.
Share Improve this question edited May 7, 2013 at 9:34 NoNicknameSFDC asked May 7, 2013 at 8:44 NoNicknameSFDCNoNicknameSFDC 2211 gold badge5 silver badges10 bronze badges 3-
Although you see Time Picker value as
time
internally is stored as a JavaScript Date, so you might ignore thedate
but it will be there no matter what you do. – OnaBai Commented May 7, 2013 at 22:15 - Did you ever find a solution for default time without setting the value? – Mark Robinson Commented Oct 30, 2013 at 12:31
- Did you find the solution for this??If so can you post ur answer? – Sachin HR Commented Aug 22, 2018 at 12:21
2 Answers
Reset to default 2Take a look at this example.
Seems to me like they are specifying a default date using the constructor:
$("#datetimepicker").kendoDateTimePicker({
value:new Date()
});
Use this article : http://docs.kendoui./api/web/datetimepicker
var dateTimePicker = $("#dateTimePicker").data("kendoDateTimePicker");
// set the selected value on the dateTimePicker to January 1st, 2011
dateTimePicker.value(new Date(2011, 0, 1));
var dateTimePicker = $("#dateTimePicker").data("kendoDateTimePicker");
dateTimePicker.value("2/23/2000 10:00 AM");
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744800267a4594448.html
评论列表(0条)