CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Validate date field

Print topic Send  topic

Author Message
adorni

Posts: 120
Posted: 03/07/2012, 11:19 AM

As I can do to validate a date field so that it can not insert a date before today's date

I use MYSQL and PHP

Thanks!
View profile  Send private message
MichaelMcDonald

Posts: 640
Posted: 03/09/2012, 4:17 PM

Place a hidden field on your form and call it like curdate and set the default value in the properties inspector to CurrentDate.

In the form on validate event put this code:

$yourdatefield= $form->yourdatefield->GetValue();

$curdate= $form->curdate->GetValue();

if ($yourdatefield[0] > $curdate[0]){
$form->Errors->addError("error message");
}
_________________
Central Coast, NSW, Australia.

View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.