0

hi i have used datepicker for picking date and i need to validate for empty value .i should not allow the user to go to next page without selecting any dates how to do that ..

4
Contributors
10
Replies
24
Views
3 Years
Discussion Span
Last Post by jstfsklh211
0
    $( "#date" ).datepicker({
minDate: 0, 
maxDate: " +10D" ,
dateFormat:'yy-mm-dd'

    });
  });

  <b>Date:</b><input type="text" name="date" id="date"  readonly>
   this is my code .the calender displays to pick the date .
   the problem is that it also accepts empty value plz help me to solve. 
0

Set a default date, or use Javascript to check for an empty value on submit. I don't think that option is embedded in the datepicker.

0

i want to display the error message in a alert box or is it possible in using html "require"

0

i have used required but its not working .. my input type is text and it is set as readonly

0

<b>Date:</b><input type="text" name="date" id="date" required readonly>

Edited by hiiiiii@

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.