close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

DateTime Question

Thread began 11/09/2012 10:25 am by rogersds267040 | Last modified 11/19/2012 1:04 pm by Jason Byrnes | 2477 views | 12 replies |

rogersds267040

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.

Sign in to reply to this post

Jason ByrnesWebAssist

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:
<?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:
<?php echo((isset($_POST["startDate"]))?$_POST["startDate"]:""?>
Sign in to reply to this post

rogersds267040

DateTime Question

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

Attached Files
New folder (4).zip
Sign in to reply to this post

Jason ByrnesWebAssist

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.

Sign in to reply to this post

rogersds267040

DateTime Question

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

Attached Files
srappointment_Insert.zip
Sign in to reply to this post

Jason ByrnesWebAssist

It seams to be working for me.

What data are you testing with? can you be more specific on how it is not working?

Sign in to reply to this post

rogersds267040

DateTime Question

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

Sign in to reply to this post

Jason ByrnesWebAssist

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

Sign in to reply to this post

rogersds267040

DateTime Question

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.

Sign in to reply to this post

Jason ByrnesWebAssist

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.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

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.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...