To restrict users to choose date from date picker only

Thread Solved

Join Date: Sep 2009
Posts: 24
Reputation: lcyew is an unknown quantity at this point 
Solved Threads: 0
lcyew lcyew is offline Offline
Newbie Poster

To restrict users to choose date from date picker only

 
0
  #1
Nov 7th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 185
Reputation: venkat0904 is an unknown quantity at this point 
Solved Threads: 19
venkat0904's Avatar
venkat0904 venkat0904 is offline Offline
Junior Poster
 
1
  #2
Nov 7th, 2009
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

Originally Posted by lcyew View Post
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.
Gimme reputation points if u find my post helpful.
use [code] tags wherever applicable
dont start a new thread unless u cant find the topic already on forum.
mark a thread "solved" as soon as u get a solution
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 24
Reputation: lcyew is an unknown quantity at this point 
Solved Threads: 0
lcyew lcyew is offline Offline
Newbie Poster
 
0
  #3
Nov 7th, 2009
Thanks you very much venkat0904. I've solved it. Have a nice day ^_^
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 24
Reputation: lcyew is an unknown quantity at this point 
Solved Threads: 0
lcyew lcyew is offline Offline
Newbie Poster
 
0
  #4
Nov 7th, 2009
Btw, for any others that may facing same problem, here's how:

<FORM>
<INPUT TYPE="TEXT" VALUE="if($dateFrom !=NUll){echo $dateFrom}" READONLY>
</FORM>
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 185
Reputation: venkat0904 is an unknown quantity at this point 
Solved Threads: 19
venkat0904's Avatar
venkat0904 venkat0904 is offline Offline
Junior Poster
 
0
  #5
Nov 8th, 2009
anytime... just remember to visit forum often n help others in need..
cheers !!!

Originally Posted by lcyew View Post
Thanks you very much venkat0904. I've solved it. Have a nice day ^_^
Gimme reputation points if u find my post helpful.
use [code] tags wherever applicable
dont start a new thread unless u cant find the topic already on forum.
mark a thread "solved" as soon as u get a solution
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC