laminas / laminas-form

Validate and display simple and complex forms, casting forms to business objects and vice versa
https://docs.laminas.dev/laminas-form/
BSD 3-Clause "New" or "Revised" License
80 stars 52 forks source link

3.13.x ensure numeric expression in datetime select option value for any locale #230

Closed pine3ree closed 1 year ago

pine3ree commented 1 year ago

Possible fix for https://github.com/laminas/laminas-form/issues/221

Note 1: To speed-up the test case, maybe we could limit the range of values in it.

Note 2: Also changed the loop limits for hours (0-23), minutes(0-59), seconds(0-59) as they make more sense than 1-24 and 1-60. The loop only increments the $date instance, the loop index is not used (it was in my previous implementation with sprintf, I missed that and ended with weird results)

Note(Q) 3: Any reason for not having FormDateTimeSelect inherit from FormDateSelect thus inheriting the getDaysOptions() method?