View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
04563 | Bug reports | Survey taking | public | 2010-08-25 16:46 | 2010-09-08 17:27 |
Reporter | ronvdburg | Assigned To | c_schmitz | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.90+ | ||||
Summary | 04563: When using dates, the javascript uses the wrong 'goodchars'. Depending on the dateformat, this should be 0123456789 with /,- or. | ||||
Description | The goodchars should not be hardcoded to '0123456789-' but depending on the jsformat. | ||||
Steps To Reproduce | See qanda.php and look for 0123456789- | ||||
Additional Information | svn diff is attached | ||||
Tags | No tags attached. | ||||
Attached Files | qanda.php.diff (1,434 bytes)
Index: qanda.php =================================================================== --- qanda.php (revision 9091) +++ qanda.php (working copy) @@ -1695,8 +1695,11 @@ $maxyear='2020'; } + $goodchars = str_replace( array("m","d","y"), "", $dateformatdetails['jsdate']); + $goodchars = "0123456789".$goodchars[0]; + $answer ="<p class=\"question\"> - <input class='popupdate' type=\"text\" alt=\"".$clang->gT('Date picker')."\" size=\"10\" name=\"{$ia[1]}\" id=\"answer{$ia[1]}\" value=\"$dateoutput\" maxlength=\"10\" onkeypress=\"return goodchars(event,'0123456789-')\" onchange=\"$checkconditionFunction(this.value, this.name, this.type)\" /> + <input class='popupdate' type=\"text\" alt=\"".$clang->gT('Date picker')."\" size=\"10\" name=\"{$ia[1]}\" id=\"answer{$ia[1]}\" value=\"$dateoutput\" maxlength=\"10\" onkeypress=\"return goodchars(event,'".$goodchars."')\" onchange=\"$checkconditionFunction(this.value, this.name, this.type)\" /> <input type='hidden' name='dateformat{$ia[1]}' id='dateformat{$ia[1]}' value='{$dateformatdetails['jsdate']}' /> <input type='hidden' name='datelanguage{$ia[1]}' id='datelanguage{$ia[1]}' value='{$clang->langcode}' /> <input type='hidden' name='dateyearrange{$ia[1]}' id='dateyearrange{$ia[1]}' value='{$minyear}:{$maxyear}' /> | ||||
Bug heat | 4 | ||||
Complete LimeSurvey version number (& build) | 9046 | ||||
I will donate to the project if issue is resolved | |||||
Browser | IE8 | ||||
Database type & version | mysql 5.0.77 | ||||
Server OS (if known) | Centos 5.3 / Linux 2.6.18 | ||||
Webserver software & version (if known) | apache 2.2.3 | ||||
PHP Version | 5.1.6 | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2010-08-25 16:46 | ronvdburg | New Issue | |
2010-08-25 16:46 | ronvdburg | File Added: qanda.php.diff | |
2010-08-25 17:41 | ronvdburg | Issue Monitored: ronvdburg | |
2010-08-28 01:29 | c_schmitz | Assigned To | => c_schmitz |
2010-08-28 01:29 | c_schmitz | Status | new => assigned |
2010-08-28 01:31 | c_schmitz | Note Added: 12720 | |
2010-08-28 01:31 | c_schmitz | Status | assigned => resolved |
2010-08-28 01:31 | c_schmitz | Resolution | open => fixed |
2010-09-08 17:27 | c_schmitz | Note Added: 12791 | |
2010-09-08 17:27 | c_schmitz | Status | resolved => closed |
2010-10-25 00:18 | c_schmitz | Category | Survey at Runtime => Survey taking |
2021-08-03 05:18 | guest | Bug heat | 2 => 4 |