close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Date Validation using DataAssist

Thread began 5/08/2014 6:24 pm by laboy390110 | Last modified 5/09/2014 12:52 pm by Jason Byrnes | 1975 views | 13 replies |

laboy390110

Date Validation using DataAssist

I'm trying to validate a date field with min and max dates. I followed the instructions posted in your WebAssist Help System, with no success. This is the code DataBrigge generates:

$WAFV_Errors .= WAValidateDT((isset($_POST["hex_Fecha_Instalacion"])?$_POST["hex_Fecha_Instalacion"]:"") . "",true,".*","mktime(0, 0, 0, date(\"m\") , date(\"d\")-7, date(\"Y\"));","mktime(0, 0, 0, date(\"m\") , date(\"d\")-0, date(\"Y\"));",true,".*","","",true,10);

Min Date = current date - 7 days
Max Date = current date

Please see line 21 of the attached file.
Please advice...
José

Sign in to reply to this post

Jason ByrnesWebAssist

it looks like you are entering the min and max dates as php without including the php brackets:

php:
mktime(0, 0, 0, date("m") , date("d")-7, date("Y"));



try entering it as:

php:
<?php echo(mktime(000date("m") , date("d")-7date("Y"))); ?>


instead.

Sign in to reply to this post

laboy390110

Nop, it doesn't work as suggested. The code I'm entering is straight from the WebAssist Help System, using WA Server Validations interface. Please see attachment... If I enter the dates as static (MinDate = 05/0/2014, MaxDate 05/09/2014) it will work. The problem is when using dynamic values.

Sign in to reply to this post

Jason ByrnesWebAssist

use this code for the min date:

<?php echo(date("m/d/Y", mktime(0, 0, 0, date("m") , date("d")-7, date("Y")))); ?>



and enter this for the max

<?php echo(date("m/d/Y")); ?>




I will forward this to the documentation team also.

Sign in to reply to this post

laboy390110

Nop, it doesn't work. Probably this can help you:
If I enter a static date value with the Validate Time "checked", the validation fails. It only works with the Validate Time option "unchecked". The WebAssist Help System mentions that in some instances both check boxes should be selected. Obviously, everything that I try, I check it both ways. Probably the script is having problems validating this mktime function. I look at it and everything seems ok to me. I have no idea. Please advise...

Sign in to reply to this post

Jason ByrnesWebAssist

  It only works with the Validate Time option "unchecked".  



your date picker does not pass the time. In the case of a date picker, you need to leave the validate time option unchecked.

Sign in to reply to this post

laboy390110

Ok, with the option unchecked it doesn't work

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

laboy390110

Please see private message...

Sign in to reply to this post

Jason ByrnesWebAssist

see PM,

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...