zofe / rapyd-laravel

deprecated rewritten in rapyd-livewire
MIT License
866 stars 297 forks source link

date in forms don't allow to save the hours #117

Open holic-cl opened 9 years ago

holic-cl commented 9 years ago

Hi, I was trying to save the hour in the date on a form but i don't know if it is possible.

I tried: $form->add('start_at','Start', 'date')->format('d-m-Y H:i:s', 'en')->rule( 'required' );

But it doesn't work. If there is a way, can you explain me?.

Regards

zofe commented 9 years ago

It doesn't work because "date" is not a "datetime" field, and because we use https://bootstrap-datepicker.readthedocs.org as js widget, it doesn't seems to support datetime.

If you have some suggestion about a different widget to make a new field "datetime" you're welcome.

As easy solution I suggest you to extend current "date" field adding an H:i:s input..
I'm little bit busy in this period.

holic-cl commented 9 years ago

i think is necessary because no widget allows using datetime in the package

I made a new field called datetime with the almost same content of field date, and i added this assets: http://www.malot.fr/bootstrap-datetimepicker/

It work fine, but i can't show datetime fields in the DataGrid, do you have any clue?, i don't know if i should add something to that class.

holic-cl commented 9 years ago

Sorry i was wrong, i can't show the datetimes in show view, in Datagrid works fine.

zofe commented 9 years ago

sharing some code is welcome :)

holic-cl commented 9 years ago

i will make a pull request soon :)

holic-cl commented 9 years ago

done, pls review

zofe commented 9 years ago

thanks! merged on master I'll review soon

holic-cl commented 9 years ago

i think it should not have to be on master branch, as i told you it have some bugs, as edit a datetime or show it in the show view

if someday you got time can you help me to fix those bugs?

zofe commented 9 years ago

sure, I'll fix asap.. however I see many problem in the js widget, so I think I'll find another: this seems more promising https://github.com/Eonasdan/bootstrap-datetimepicker

holic-cl commented 9 years ago

ok, i will find someone too, that one looks good

holic-cl commented 9 years ago

hey, i almost done with this datetimepicker https://eonasdan.github.io/bootstrap-datetimepicker

i will send you a pull request soon

CHOMNANP commented 8 years ago

Hi, I'm just curious, can we use time picker in Rapyd now?

holic-cl commented 8 years ago

Hi, i didn't make the pull request, i was thinking to make it but i was without time.

I don't know if zofe made it.

CHOMNANP commented 8 years ago

I tried it, and it works :) Datetime is available in Rapyd.

holic-cl commented 8 years ago

nice :+1: