<rich:calendar id="orderpickDate" oninputfocus="check(#{myForm.packingListId})"
When creating a calendar you get an input field and an img that popups the calendar.
In the js function I can disable the input field:
function check(packId) {
var canEditThisDate = true;
// canEditThisDate = true/false <-- checked using jQuery.ajax() if date can still be
// updated by the user
if (! canEditThisDate) {
jQuery("input[id='shipmentForm:orderpickDateInputDate']").attr("disabled", true);
}
}
The input field can then not be changed manually. But you can still click on the img and select a date and then the input field is updated with the selected day.
How can I disable the richfaces popup in the js function?