DateTime Question
I have a page, see below.
srappointment_Insert.php
How can I use DataBridge to compare the Start and End to ensure that the Start Date and Time is not greater than the End Date and Time.
Any examples will be appreciated.
I have a page, see below.
srappointment_Insert.php
How can I use DataBridge to compare the Start and End to ensure that the Start Date and Time is not greater than the End Date and Time.
Any examples will be appreciated.
Use Date / Time server validation.
you can use dynamic data in the date / time validation for the minimum and maximum dates.
The example is will use uses form elements named startDate and endDate
Add Date Date Validation for the startDate form field, and use the following code for the Maximum date setting:
<?php echo((isset($_POST["endDate"]))?$_POST["endDate"]:"") ?>
Use Date Validation again for the endDate form element, this time set the Minimum Date to use the start date form element:
<?php echo((isset($_POST["startDate"]))?$_POST["startDate"]:"") ?>
Thanks,
I tried what you specified but not working. Don't think I'm doing the right thing.
Please see attachment and link below.
srappointment_Results.php
since you have separate elements for start date and start time you need to validation those separately.
meaning 4 validations, start date validation, start time validation, end date validation and end time validation.
I just cannot get the Date/Time server validation to work. I got the date to work but not Date/Time. Not sure what I'm doing wrong, Help.
See below for link.
srappointment_Insert.php
It seams to be working for me.
What data are you testing with? can you be more specific on how it is not working?
Sorry, what I'm trying to do is basically if the End Date/Time is before Start Date/Time, give an error stating that End Date/Time cannot be before Start Date/Time.
E.g
Start Date/Time - 2012-11-12 9:00 AM
End Date/Time - 2012-11-12 8:00 AM
End Date/Time cannot be before Start Date/Time
that is the behavior i am seeing.
if i try your page and enter:
Start Date/Time - 2012-11-12 9:00 AM
End Date/Time - 2012-11-12 8:00 AM
i see the error message:
End Date/Time cannot be before Start Date/Time
Yes, that's what I see but when I input the correct date and time where the Start Dat/Time is before End Data/Time it still give that same error and don't submit the form.
ahh, see that's the detail that was missing.
I have created a support ticket so we can look into this issue further.
To view and edit your support ticket, please log into your support history:
supporthistory.php
If anyone else is experiencing this same issue, please append to this thread.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.