Skip to content

Commit

Permalink
Fixed issue : unable to enter some date without datepicker
Browse files Browse the repository at this point in the history
Dev: maxlength of string is bad with non leading 0 format
  • Loading branch information
Shnoulle committed Jul 3, 2014
1 parent 13f347e commit 87a7655
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion application/helpers/qanda_helper.php
Expand Up @@ -1288,8 +1288,9 @@ function do_date($ia)

$goodchars = str_replace( array("m","d","y"), "", $dateformatdetails['jsdate']);
$goodchars = "0123456789".substr($goodchars,0,1);
// Max length of date : Get the date of 1999-12-30 at 32:59:59 to be sure to have space with non leading 0 format
// "+1" makes room for a trailing space in date/time values
$iLength=strlen($dateformatdetails['dateformat'])+1;
$iLength=strlen(date($dateformatdetails['phpdate'],mktime(23,59,59,12,30,1999)))+1;


// HTML for date question using datepicker
Expand Down

0 comments on commit 87a7655

Please sign in to comment.