EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: korenanzo on July 24, 2017, 03:59:56 AM



Title: datebox : do not show calendar if typing
Post by: korenanzo on July 24, 2017, 03:59:56 AM
Hi,

I'd like to show the calendar only if the user clicks the calendar icon: when the user types the data the calendar should not appear : is it possible to achieve this?

Thanks, Ric


Title: Re: datebox : do not show calendar if typing
Post by: jarry on July 24, 2017, 03:30:10 PM
You can set the 'editable' property to false to prevent the user from typing chars on the inputing box.
Code:
$('#d1').datebox({
  editable: false
});
Or disable the default keydown event handler by using this code:
Code:
$('#d1').datebox({
inputEvents: $.extend({}, $.fn.datebox.defaults.inputEvents, {
keydown: function(){}
})
})