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?


5 Posts   1291 Views


20 December 2010 at 10:59pm Community Member, 198 Posts

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?




23 December 2010 at 10:16am Community Member, 88 Posts

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.


23 December 2010 at 9:29pm Community Member, 198 Posts

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.



24 December 2010 at 10:16am Community Member, 88 Posts

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

merry xmas


24 December 2010 at 7:06pm Community Member, 198 Posts

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