-
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
-
-
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
-
-
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
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks