Hi all,
I want to replace input of datepicker by a label, just display: 15/4/2014 [c] with [c] is a calendar icon. Is there any simple way to implement it?
Thanks,
Ngan
Hello Ngan,
The current implementation of the igDatePicker does not allow changing the type of the input field, however by handling the keyDown event of the widget it is possible to cancel the event when the focus is on the input field, therefore preventing keyboard input:
$("#datePicker").igDatePicker({ keydown: function (evt, ui) { if (evt.originalEvent.target.id === "datePicker") { //evt.preventDefault(); } } });
Hope this helps. Please feel free to contact me if you have any questions.
HI Petar,
I worked around for this by manual added attr and change css to display like a label.