hi guys,
I'm working on datebox lately I'm having trouble in creating a validation if users input wrong characters and when user select greater day than today
this is my code:
<input name="date_issue" type="text" class="easyui-datebox normalsize" validType="validDate md[\'10/07/2014\']" required="true"/>
$.extend($.fn.validatebox.defaults.rules, {
md: {
validator: function(value, param){
var d1 = $.fn.datebox.defaults.parser(param[0]);
var d2 = $.fn.datebox.defaults.parser(value);
return d2<=d1;
},
message: 'The date must be less than or equals to {0}.'
},
validDate: {
validator: function(value){
var date = $.fn.datebox.defaults.parser(value);
var s = $.fn.datebox.defaults.formatter(date);
return s==value;
},
message: 'Please enter a valid date.'
}
});
thanks in advance