EasyUI Forum
September 14, 2025, 04:15:33 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: Disable dates  (Read 17020 times)
rangaNadha
Jr. Member
**
Posts: 50


View Profile
« on: November 02, 2015, 02:49:30 AM »

Hi,

Is there any way to disable all the dates greater than current date in easy ui datebox.


Thanks in advance.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: November 02, 2015, 05:06:26 PM »

This example shows how to restrict date range in a datebox.
http://www.jeasyui.com/demo/main/index.php?plugin=DateBox&theme=default&dir=ltr&pitem=Restrict%20Date
Logged
rangaNadha
Jr. Member
**
Posts: 50


View Profile
« Reply #2 on: November 18, 2015, 10:34:48 PM »

Thank you...
Logged
mzeddd
Full Member
***
Posts: 223



View Profile
« Reply #3 on: November 19, 2015, 04:47:55 AM »

This is what I have for this case:
Code:
$('#version').datebox('calendar').calendar({
firstDay: 1,
validator: function(date){
var now = new Date();
return date<=now;
}
});
Logged
rangaNadha
Jr. Member
**
Posts: 50


View Profile
« Reply #4 on: November 26, 2015, 10:34:15 PM »

Hi stworthy/mzeddd,


I added code like that but it is able to take the other dates if user enters manually.

Is there any why to restrict the date using easyUI or do we need to add the validation manually?

Thanks
Logged
rangaNadha
Jr. Member
**
Posts: 50


View Profile
« Reply #5 on: October 27, 2016, 07:15:53 AM »

Hi stworthy,

http://www.jeasyui.com/demo/main/index.php?plugin=DateBox&theme=default&dir=ltr&pitem=Restrict%20Date

In the above link also if i add disable date and press tab, date is not changed to current date. It is only updating once we press enter.
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!