EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: kg on March 06, 2014, 08:38:08 PM



Title: How to set easyui-datebox can click Monday only & can't select > today
Post by: kg 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!!



Title: Re: How to set easyui-datebox can click Monday only & can't select > today
Post by: stworthy 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;
}
}


Title: Re: How to set easyui-datebox can click Monday only & can't select > today
Post by: kg on March 10, 2014, 08:15:47 PM
Thank you very much! stworthy