0

I have wrote the following code for date input:

$( "#datepicker" ).datepicker();

full DEMO

But this input is not enough friendly for user. user can type to input something wrong and confusion with date format can happen. Is there way to make date input dramatically friendly for user?

P.S.

I know I can use masks. Can you advise another options?

Community
  • 1
  • 1
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
  • 1
    This is a VERY subjective question. What is "dramatically friendly" really mean after all? If you have a more specific question like "I have tried to add some additional data validation logic to jQuery UI datepicker and it is not working" you should ask it, as this is just going to be closed as is. – Mike Brant Jul 21 '15 at 20:12
  • 1
    possible duplicate of [JQuery Datepicker with text input that doesn't allow user input](http://stackoverflow.com/questions/153759/jquery-datepicker-with-text-input-that-doesnt-allow-user-input) – cmbuckley Jul 21 '15 at 20:15
  • You can make it so that the input box is not directly editable and have it so that only the datepicker can edit the input box. – IWillScoop Jul 21 '15 at 20:15

1 Answers1

2

Just add readonly to the input to avoid user entering text to the input.

DEMO

RobertoNovelo
  • 3,347
  • 3
  • 21
  • 32