EasyUI Forum
April 19, 2024, 02:33:53 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: datebox : do not show calendar if typing  (Read 4120 times)
korenanzo
Full Member
***
Posts: 145


View Profile
« 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
Logged

-- Licensed User --

www.kitelabs.it
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 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(){}
})
})
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!