Format an input textbox

Results 1 to 5 of 5

Thread: Format an input textbox

  1. #1
    Emery Guest

    Default Format an input textbox

    Is there any way to format an input textbox so that it will only accept a date entered as ##/##/## format with the default date being the current day.

  2. #2
    Jason Buck Guest

    Default RE: Format an input textbox

    You can make the date the default value by doing the following:<BR><BR>&#060;tr&#062;&#060;td&#062;Date : &#060;input type="text" name="date" Value="&#060;%=date()%&#062;" &#062;&#060;/td&#062;&#060;/tr&#062;<BR><BR>I recommend that you use the Validation script shown in the ASP acticles from right here (4guysfromrolla) or Activeserverpages.com (http://www.learnasp.com/learn/ )<BR><BR>respectfully,<BR><BR>Jason<BR>webmaster@w nj.com<BR> <BR><BR>

  3. #3
    Emery Guest

    Default This did not work. Any other suggestions?

    All this did was show &#060;%=date()%&#062; in the text box.

  4. #4
    Join Date
    Dec 1969
    Posts
    672

    Default RE: This did not work. Any other suggestions?

    the long way<%=month(date)&"/"&day(date)&"/"&year(date)%>as for making sure about the format, i would recomend using 3 seperate text boxes and put it together on the next page
    ________
    FERRARI 512
    Last edited by Jay; 04-16-2011 at 01:31 AM.


  5. #5
    adrian Guest

    Default RE: This did not work. Any other suggestions?

    it will if you make your page an .asp file instead of .html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •