0

Hi all.

I have two date input fields. Is there any way to restrict date input from only date picker (users are not allowed to input date through keyboard). The reason I want it this way is to prevent users from entering invalid dates.

Any help provided is greatly appreciated. Thanks in advance.

2
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by venkat0904
1

assuming that u already have a datepicker which sets the selected date value in a text field, u can make ur textbox as readonly... just add the "readonly" attribute in ur input field

Hi all.

I have two date input fields. Is there any way to restrict date input from only date picker (users are not allowed to input date through keyboard). The reason I want it this way is to prevent users from entering invalid dates.

Any help provided is greatly appreciated. Thanks in advance.

0

Thanks you very much venkat0904. I've solved it. Have a nice day ^_^

0

Btw, for any others that may facing same problem, here's how:

<FORM>
<INPUT TYPE="TEXT" VALUE="if($dateFrom !=NUll){echo $dateFrom}" READONLY>
</FORM>
0

anytime... just remember to visit forum often n help others in need..
cheers !!!

Thanks you very much venkat0904. I've solved it. Have a nice day ^_^

This question has already been answered. 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.