Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Date and Time in front end forms?


Reply


5 Posts   1332 Views

Avatar
cumquat

Community Member, 198 Posts

20 December 2010 at 10:59pm

Hi there,

I have a question, I'm currently doing a site that requires people to submit their availability, now I have a backend in Model admin that is finally working fine after some help, and now I'm trying to put together a front end form for the teams to quickly just enter their availability which is both date and time.
Currently I have used a datetime field, now in Model admin I have been able to use a nice form to collect this info but for the life of me I can't seem to get a similar front end form after much forum searching I managed to get a popup calendar to appear using a DatePickerField but I don't know how to integrate the time part.
I have looked at UC's event-module and he uses separate date and time fields in the database is this a better/easier way to go or am I (as usual) missing the obvious and there's a really simple way to combine date and time in a front end form?

Cheers

mick

Avatar
dompie

Community Member, 88 Posts

23 December 2010 at 10:16am

There is a SS_Datetime Database Type and a DatetimeField. But both come without date/time pickers, if that's ok for you. Don't know if they work well togehter, haven't used them yet.

Avatar
cumquat

Community Member, 198 Posts

23 December 2010 at 9:29pm

Thanks for your response, it's really the fact that i want a datetime picker in the front end and am just not sure of the best way to handle it. I have been trying to integrate the script below into my form but i don't seem to be able to get it to work.

[url]http://blog.w3visions.com/2009/04/date-time-picker-with-jquery-ui-datepicker/[/url]

Avatar
dompie

Community Member, 88 Posts

24 December 2010 at 10:16am

Oh, that's a very nice plugin you found there. Do you receive any javascript errors or any errors at all?

merry xmas

Avatar
cumquat

Community Member, 198 Posts

24 December 2010 at 7:06pm

No errors, I just can't get it to work :-(