Page 1 of 1

How to set a datepicker input field to readonly so as to force the user to use the picker for input?

Posted: Wed Sep 04, 2013 7:32 am
by fender

I've tried adding a property to the datepicker component "readOnly" "true" but this did not work.


How to set a datepicker input field to readonly so as to force the user to use the picker for input?

Posted: Wed Sep 04, 2013 10:39 am
by Anton Artyukh5836028

Hi,

Create Page Show event with code like this:
pre$( Appery( "mobiledatepicker_NAME" ).datapickerRoot )
.find( 'input' ).attr( { readonly: "readonly" } );/pre


How to set a datepicker input field to readonly so as to force the user to use the picker for input?

Posted: Wed Sep 04, 2013 10:54 am
by fender

Thank you for the fast reply. Works for me. cheers