Results 1 to 3 of 3

Thread: Jason's Date Input Calendar

  1. #1
    Join Date
    Mar 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Jason's Date Input Calendar

    1) Script Title: Jason's Date Input Calendar

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

    3) Describe problem: This script does a great job when inputting dates to a form/database but I would like to be able to change the date view on the form based on dates retrieved from a database.

    Does anyone have any ideas on how to do this?

    Thanks,
    Mike

  2. #2
    Join Date
    Aug 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Date Input Calendar

    Hi Mike,

    Yes, you can change the date in form (to show users).

    i.e. you use DateInput('myDate',true,'YYYY-mm-dd')

    then do following:

    1. when you get a date from database, break it into day, month and year.

    then..

    myDate_Day_ID.selectedIndex=day - 1 (index starts with 0 so you have to date - 1)

    myDate_Month_ID.selectedIndex=month - 1

    myDate_Year_ID.value = year

    So first, create the dateinput and then change it. dont try to change it before you create.



    KP

  3. #3
    Join Date
    Aug 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Edit date from database


    Hi,

    Can this script be modified to retrieve the date from the database, prefill the drop menus with those values and then allow the user to correct the date.
    After the correction, the values should be able to be update to the database again.

    Thanks

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
  •