Go Back   Dynamic Drive Forums > DD Scripts > Dynamic Drive scripts help
Search Dynamic Drive Forums:

Reply
 
Thread Tools Search this Thread
  #1  
Old 07-14-2008, 12:01 PM
mikekist mikekist is offline
Junior Coders
 
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
Reply With Quote
  #2  
Old 08-03-2008, 10:23 PM
developer96 developer96 is offline
New Comer (less than 5 posts)
 
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
Reply With Quote
  #3  
Old 08-27-2008, 05:09 AM
dd_r45jiji dd_r45jiji is offline
New Comer (less than 5 posts)
 
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
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:14 PM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.