tags:

views:

198

answers:

2

hi i have a field called AppDate and it should get disabled conditionally the field is getting disabled but the date picker icon is not getting disable, hence though i disable AppDate Field users are able to change the date

following is the code i am using any help pls?

<hx:inputHelperDatePicker firstDay="1" rendered="true" styleClass="inputText_DatePicker" disabled/>

<f:convertDateTime dateStyle="short" pattern="MM/dd/yyyy" />
    <hx:inputHelperDatePicker firstDay="1" rendered="true" styleClass="inputText_DatePicker" disabled/>
    <hx:inputHelperAssist errorClass="inputText_Error" promptCharacter="_" />
    </h:inputText></td>
A: 

I have no idea which date picker you are using. So I'll speak generally, you should probably 'unbind' the click/mouse[up|down] event from the "icon" and rebind it back when you enable the input textbox

Tzury Bar Yochay
A: 

Assuming you are referring to JQuery's datepicker plug-in, you can disable/destr0y the datepicker:

//disable
$("yourdateinput").datepicker( 'disable' ); 

//destroy if you not going to need it anymore
$("yourdateinput").datepicker( 'destroy' );

http://docs.jquery.com/UI/Datepicker#methods

o.k.w