Jump to:

23490 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Date and Time in front end forms?

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

Page: 1
Go to End
Author Topic: 1285 Views
  • cumquat
    Avatar
    Community Member
    198 Posts

    Date and Time in front end forms? Link to this post

    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

  • dompie
    Avatar
    Community Member
    88 Posts

    Re: Date and Time in front end forms? Link to this post

    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.

  • cumquat
    Avatar
    Community Member
    198 Posts

    Re: Date and Time in front end forms? Link to this post

    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.

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

  • dompie
    Avatar
    Community Member
    88 Posts

    Re: Date and Time in front end forms? Link to this post

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

    merry xmas

  • cumquat
    Avatar
    Community Member
    198 Posts

    Re: Date and Time in front end forms? Link to this post

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

    1285 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.