Results 1 to 3 of 3

Thread: Is it possible to change the date order in the input calendar form itself?

  1. #1
    Join Date
    Sep 2007
    Location
    Maui
    Posts
    650
    Thanks
    289
    Thanked 15 Times in 15 Posts

    Default Is it possible to change the date order in the input calendar form itself?

    1) Script Title: Jason's Date Input Calendar

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...oncalendar.htm

    3) Describe problem: I see how to control the format of the date produced by the input form, but is there a way to have the drop-downs in the input form correspond to the date format chosen? ie. I have set the date to YYYY-MM-DD and would like the input form to be in the format YYYY MON DD. I don't see where to change that. Thanks.Click image for larger version. 

Name:	input-calendar.jpg 
Views:	683 
Size:	2.7 KB 
ID:	6589

  2. #2
    Join Date
    Oct 2022
    Posts
    17
    Thanks
    1
    Thanked 4 Times in 4 Posts

    Default

    HTML code for Change date month year

    Code:
    <form>
      <div class="nativeDatePicker">
        <label for="bday">Enter your birthday:</label>
        <input type="date" id="bday" name="bday" />
        <span class="validity"></span>
      </div>
      <p class="fallbackLabel">Enter your birthday:</p>
      <div class="fallbackDatePicker">
        <span>
          <label for="day">Day:</label>
          <select id="day" name="day"></select>
        </span>
        <span>
          <label for="month">Month:</label>
          <select id="month" name="month">
            <option selected>January</option>
            <option>February</option>
            <option>March</option>
            <option>April</option>
            <option>May</option>
            <option>June</option>
            <option>July</option>
            <option>August</option>
            <option>September</option>
            <option>October</option>
            <option>November</option>
            <option>December</option>
          </select>
        </span>
        <span>
          <label for="year">Year:</label>
          <select id="year" name="year"></select>
        </span>
      </div>
    </form>
    Last edited by james438; 04-13-2023 at 01:31 AM. Reason: format

  3. The Following User Says Thank You to Finacustech For This Useful Post:

    kuau (04-28-2023)

  4. #3
    Join Date
    Sep 2007
    Location
    Maui
    Posts
    650
    Thanks
    289
    Thanked 15 Times in 15 Posts

    Default

    Sorry for the delayed response. I didn't receive an email. Wow, thanks! I had no idea there was a nativeDatePicker available in html5. I wonder what else html5 has that I don't know about. Shall have to do some searching. I may be able to find this but in case I cannot, is there a way to specify the date format? My Windows is set to yyyy-mm-dd so that is the format that shows in the calendar but on a computer set to mm-dd-yyyy, the calendar displays mm-dd-yyyy. I didn't try submitting yet so I'm not sure what date format actually gets submitted by the form, but I need everything in the yyyy-mm-dd format. Thanks so much for the cool code!

Similar Threads

  1. Jason's Date Input Calendar - Default value or form value?
    By Promaetheus in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 01-21-2013, 07:45 AM
  2. Replies: 6
    Last Post: 05-01-2012, 11:38 AM
  3. Using Jason's Date Input Calendar with .NET Form
    By Jedi in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 06-16-2009, 02:40 PM
  4. Jason's Date Input Calendar onClick to change the showing date
    By williamstam in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 03-13-2008, 12:48 PM
  5. Change first day of week (Jason's Date Input Calendar)
    By DjSoundIT in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 11-09-2005, 12:41 AM

Bookmarks

Posting Permissions

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