EasyUI Forum

General Category => General Discussion => Topic started by: manojvijayan on November 20, 2012, 03:46:10 AM



Title: set MinValue Na MaxValue to date
Post by: manojvijayan on November 20, 2012, 03:46:10 AM
How can set minvalue and maxvalue when we use two date pickers?



Title: Re: set MinValue Na MaxValue to date
Post by: stworthy on November 20, 2012, 07:12:17 PM
When select a value, the 'onSelect' event will be triggered, which can be used to constrain the min or max value in datebox.
Code:
<input class="easyui-datebox" data-options="onSelect:onSelect"></input>
function onSelect(value){
var d = $.fn.datebox.defaults.parser('11/15/2012');
if (value<d){
$(this).datebox('setValue','11/15/2012');
}
}