1

I have this $("#xt1").datepicker({ dateFormat: 'dd-M-yy' }); statement for the datepicker in Jquery with this statement user can enter some value for the date in the text field where as with this statement $("#xt1").datepicker(); user cannot enter any value in to the Text field . How can we format the date and as well as not allow the user to enter the date

1
  • Did the below answer work for you? :-) Commented Nov 30, 2010 at 20:30

1 Answer 1

1

@Derby: Add the readonly="readonly" attribute to the #xt1 input, e.g.:

<input type="text" name="xt1" id="xt1" readonly="readonly" />
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.