EasyUI Forum
May 17, 2024, 08:39:51 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to set easyui-datebox can click Monday only & can't select > today  (Read 6351 times)
kg
Newbie
*
Posts: 9


View Profile
« on: March 06, 2014, 08:38:08 PM »

Hi All,

How to set easyui-datebox
Q1. User can click Monday only
Q2. User can't select > today.

THS!!

Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: March 10, 2014, 12:58:59 AM »

The 'validator' function of calendar will be available since next version, which allows the user determines what dates are selectable. Try download the preview plugin from http://www.jeasyui.com/easyui/plugins/jquery.calendar.js and include to the page. The code below shows how to allow the user only select Mondays.
Code:
var c = $('#dd').datebox().datebox('calendar');
c.calendar('options').validator = function(date){
if (date.getDay() == 1){
return true;
}
}
Logged
kg
Newbie
*
Posts: 9


View Profile
« Reply #2 on: March 10, 2014, 08:15:47 PM »

Thank you very much! stworthy
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!