I have a very simple model that includes the auto-filled field much like 'created'. (DateTime format).
I'd like to use the Form helpers if possible, to validate the date fields and whatnot.
I'd like a simple form with a "Begin Date" (YMD, 12 hours), and an "End Date" (same format).
There is already a controller action set up as follows:
function view_between($start_date = null, $end_date = null) {
// ... stuff that works correctly when the URL is manually entered.
}
Have I defined the controller wrong, or how can I pass these values into that function?
The reason I'm stuck is because I tried adding a $form->input('my_datetime_field' ...)
twice, but obviously the name/id were the same on the respective elements.
I have also tried using $form->dateTime(...)
with similar results.
I'm not sure how to uniquely identify a Begin and End date selection, when it should interact with a single field.
Am I going about this wrong? A kind shove in the right direction should suffice.