Foren
Alloy Datepicker customization Disable saturday and sunday
Manish Yadav, geändert vor 7 Jahren.
Alloy Datepicker customization Disable saturday and sunday
Expert Beiträge: 493 Beitrittsdatum: 26.05.12 Neueste Beiträge
Hello All,
I want to customize alloy date picker , disable all Saturday and Sundays values so user can't select any values from these dates.
Regards,
Manish Yadav
I want to customize alloy date picker , disable all Saturday and Sundays values so user can't select any values from these dates.
AUI().use('aui-datepicker', function(A) {
var RFPDate = new A.DatePicker({
trigger : '#startDate',
mask : '%d/%m/%Y',
popover : {
zIndex : 1
}
});
Regards,
Manish Yadav
Anhänge:
Alfonso Crisci, geändert vor 7 Jahren.
RE: Alloy Datepicker customization Disable saturday and sunday
Regular Member Beiträge: 136 Beitrittsdatum: 02.04.14 Neueste Beiträge
Hi,
Would this help?
Documentation: http://alloyui.com/versions/2.5.x/api/classes/Calendar.html#attr_disabledDatesRule
Would this help?
<aui:script>
AUI().use('aui-datepicker', function(A) {
var allWeekendsRule = {
"all": {
"all": {
"all": {
"0,6": "all-weekends"
}
}
}
};
new A.DatePicker({
trigger: '#<portlet:namespace />datepickernoweekend',
mask: '%Y.%m.%d',
calendar: {
customRenderer: {
rules: allWeekendsRule
},
disabledDatesRule: 'all-weekends'
},
popover: {
zIndex: 1
}
});
});
</aui:script>
Documentation: http://alloyui.com/versions/2.5.x/api/classes/Calendar.html#attr_disabledDatesRule