![]() |
daterangepicker form not working - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: daterangepicker form not working (/showthread.php?tid=60970) |
daterangepicker form not working - El Forum - 08-14-2014 [eluser]Unknown[/eluser] I'm using an example of bootstrap-datetimepicker in my codeigniter project. I create a form with only the datetimepicker input. view: Code: <?php // Change the css classes to suit your needs Code: $('#reservationtime').daterangepicker({timePicker: true, timePickerIncrement: 30, format: 'DD-MM-YYYY hh:mm:ss', timePicker12Hour: false, separator: '/'}); The datepicker works fine but when i submit the form, I want to format the data and split into an array: Controller: Code: $this->form_validation->set_rules('reservationtime', 'reservationtime', ''); Then I try to insert the values: Code: $form_data = array( But if I print the array, its empty: Code: Array ( [start] => [end] => ) Wha'ts wrong with the code? Thanks for the help ![]() daterangepicker form not working - El Forum - 08-15-2014 [eluser]InsiteFX[/eluser] Code: echo form_open('/calendario/nadevent/', $attributes); ?> daterangepicker form not working - El Forum - 08-15-2014 [eluser]CroNiX[/eluser] I don't know anything about that datetimepicker, but it looks like you set the "format" to "DD-MM-YYYY hh:mm ![]() What do you get if you: die(set_value('reservationtime')); ?? |