Forums

select date range between two dates

raivis 18 Jul, 2012
Hi Guys!

How could I select the range between two dates chosen by date picker?
Lets say field 'start' = 2012-08-01 and field 'end' = 2012-08-05
It means there are 5 dates range (from 1st till 5th of August)

And I need to create the DB table records for each of these dates like:

id|Date______|Recource__|
1 |2012-08-01 |1 |
2 |2012-08-02 |3 |
3 |2012-08-03 |1 |
4 |2012-08-04 |2 |
5 |2012-08-05 |4 |



* "Resource" is whatever selected in a form from other fields
tcroelandsveld 18 Jul, 2012
Hello,
If you select in the forms manager your form. In the field 'DateTime Picker config' just put

minDate: '2012-08-01', maxDate: '2012-08-05'


It works for me with the latest version of chronoforms.

You can find more options for the datepicker on the site of Mootools http://mootools.net/forge/p/mootools_datepicker.

I hope this helps you with your problem
Regards
Bart
GreyHead 22 Jul, 2012
Hi Raivis,

You are going to need to add a Custom Code action in the form On Submit event and use PHP to read the data values and create and save the records that you need to enter.

Bob
This topic is locked and no more replies can be posted.