fender
Posts: 0
Joined: Sun Sep 01, 2013 9:03 am

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

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

Anton Artyukh5836028
Posts: 0
Joined: Wed May 08, 2013 12:57 pm

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

Hi,

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

fender
Posts: 0
Joined: Sun Sep 01, 2013 9:03 am

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

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

Return to “Issues”