Skip to main content
Known Participant
December 8, 2009
Question

need help to this request urgent plzz

  • December 8, 2009
  • 1 reply
  • 2173 views

Hi i am new to coldfusion i had a form and in form we have two date fields like date1------------ to date2----------------  and i   need to make the second date field default to 7 calendar days from the first date field that was entered.The new date field needs to be non changale

any help regarding this

thanks.

This topic has been closed for replies.

1 reply

Inspiring
December 8, 2009

Is it necessary for the user to see the date that is 7 days in the future?  If that second date is being stored, maybe you can just calculate it on submission?

If the dates can be flexible, here's a neat jquery option to ensure the end date is not before the start date.

http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerStartEnd.html

cfnewAuthor
Known Participant
December 8, 2009

yes the user has to see the future date and also user is not allowed to change that date that means we have to disable the second date field when user enters date in first field.

cfnewAuthor
Known Participant
December 8, 2009

Actually it sounds like you want it to always be disabled, which the disable parameter or form controls handles fairly well.

Then you would just use JavaScript date functions to calcualte the 7 day date when the first field is completed and dislplay it in the second field.


thanks lan ,any help regarding this i am new to coldfuison and these stuff thanks