google-code-export / cfwheels

Automatically exported from code.google.com/p/cfwheels
0 stars 0 forks source link

Option to not combine form helper date parts #169

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
DateSelectTag, YearSelectTag, MonthSelectTag etc needs a boolean 
"combineDateParts" argument. When set to "false" Wheels should not combine 
the date parts into one date on form submission.

Original issue reported on code.google.com by per.djurner@gmail.com on 10 Apr 2009 at 1:44

GoogleCodeExporter commented 9 years ago

Original comment by per.djurner@gmail.com on 7 May 2009 at 3:08

GoogleCodeExporter commented 9 years ago

Original comment by tpetru...@gmail.com on 29 Jun 2009 at 10:44

GoogleCodeExporter commented 9 years ago

Original comment by per.djurner@gmail.com on 13 Nov 2009 at 12:16

GoogleCodeExporter commented 9 years ago

Original comment by per.djurner@gmail.com on 16 Nov 2009 at 1:53

GoogleCodeExporter commented 9 years ago
I think this is very useful, I'll take it on

Original comment by andybellenie on 16 Jun 2010 at 11:49

GoogleCodeExporter commented 9 years ago
Changed mind, pushing this back to help get 1.1 out of the door.

Original comment by andybellenie on 17 Jun 2010 at 12:07

GoogleCodeExporter commented 9 years ago
I think Tony wanted to keep this as 1.1, resetting.

Original comment by per.djurner@gmail.com on 17 Jun 2010 at 2:13

GoogleCodeExporter commented 9 years ago
Ok, any suggestions on how to do it? The combining is done server-side on the 
submitted form, so we'd have to pass something through in the post, which is 
going to be very messy. 

Original comment by andybellenie on 17 Jun 2010 at 2:22

GoogleCodeExporter commented 9 years ago
looking at the $createParams method of the dispatcher, it looks like these are 
combined based of the name. ie mydate($year) and mydate($month) get merged 
together. it should be simply enough. using the suggested combineDateParts 
argument, just remove the ($[part]). so if combineDateParts is false then the 
fields should be named: mydate-year and mydate-month.

thoughts?

Original comment by tpetru...@gmail.com on 17 Jun 2010 at 4:19

GoogleCodeExporter commented 9 years ago
Makes sense to me.

Original comment by per.djurner@gmail.com on 17 Jun 2010 at 4:49

GoogleCodeExporter commented 9 years ago

Original comment by tpetru...@gmail.com on 17 Jun 2010 at 5:01

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r4546.

Original comment by tpetru...@gmail.com on 17 Jun 2010 at 5:38

GoogleCodeExporter commented 9 years ago
NOTES
=====

the argument is simply name "combine" instead of the suggested 
"combineDateParts"

i had to use objectName[property-part] in order not to break the params naming 
convention.

also there is no default value setting like there is when date parts are 
combine. the reason for this is that by not combining the data parts we can 
assume that the developer even wants a valid date.

by not having the data parts combined we giving the developer the raw form 
input in the params and it is up to them to validate it.

Original comment by tpetru...@gmail.com on 17 Jun 2010 at 5:45