Hello,
I need to use TimePicker on my website shown in the attachment. I was wondering if Ignite UI provides such a control?
Regards,
Arfan Baig
Hello Arfan,
For time with seconds just use "timeLong" for dateInputFormat and dateDisplayFormat.
Here is an example code:
$("#dateEditor").igDateEditor({
dateInputFormat: "timeLong",
dateDisplayFormat: "timeLong",
nullText: "Enter Time",
button: "spin",
value: new Date("2013-04-01T15:40:40Z")
});
Best regards,Martin Pavlov
Infragistics, Inc.
Hello Martin,
Thanks for providing the solution, which is working quite fine.
Just one more thing: how do I tell this TimePicker to display seconds as well?
i.e; instead of displaying 12:30 I want to display 12:30:34 (including the seconds)
Hello Afran,
There is no standalone TimePicker control. Instead igDatePicker can show only time values.
Here is the code with which you can achieve TimePicker functionality:
$("#dateEditor").igDateEditor({ dateInputFormat: "time", dateDisplayFormat: "time", nullText: "Enter Time", button: "spin",value: new Date("2013-04-01T15:40:40Z")});
To get the value of the igDatePicker use the following API: $(".selector").igDatePicker("value");
Note: You'll have to work with JavaScript Date object when setting/getting values from the igDateEditor.
Hope this helps,Martin PavlovInfragistics, Inc.