Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Simon Hewitt 65 posts 126 karma points
    Oct 05, 2011 @ 15:42
    Simon Hewitt
    0

    Time picker Datatype

    I need to give my users the ability to set a time range, for my purposes it makes sense to have this in two seperate properties so I hoped to use something like the javascript dual slider ui found in the date with time picker renderer.

    Can anyone give me some clues on how to go about getting something like this together or maybe knows of work someone else has done to create this feature?

    Many thanks

    Simon

  • Rich Green 2246 posts 4008 karma points
    Oct 05, 2011 @ 16:06
    Rich Green
    0

    Hi Simon,

    Welcome to the Umbraco forum :)

    Out the box you can set 2 properties, one for start time and one for end time. The only downside is that I'm not sure without extra work you could validate that the end time is greater than the start time.

    So to summerise you can already achieve what you're trying to do, however depending on how much time you have you could develop your own custom datatype.

    Rich

  • Simon Hewitt 65 posts 126 karma points
    Oct 05, 2011 @ 16:28
    Simon Hewitt
    0

    Hi Rich,

    Thanks for the welcome!

    I don't think I made myself very clear in my original post so I think we may have our wires crossed a little here.

    I am using PDCalendar to act as an events calendar but the package doesn't accomodate times in the events so I would like to have two properties on the doc type that will only contain a time string (or possibly date/time entry). I assume you mean the publish and unpublish properties under generic properties when you mention the out of the box properties which would work if I wasn't already collecting the start / end dates via the PDCalendar datatype which also allows for recurrence.

    Maybe my way forward is to ditch PDCalendar and create some xslt that will create the calendar and populate the events based on the publish and unpublish dates, this seems more manageable to a new Umbraco user rather than having to create a new data type with a javascript UI component just to collect a time.

    Thanks

    Simon

  • Rich Green 2246 posts 4008 karma points
    Oct 05, 2011 @ 17:01
    Rich Green
    0

    Hey Simon,

    Ahh, I didn't realise that you were using PDCalendar. I haven't used it so can't say to be honest!

    Maybe post something in the support forum here http://our.umbraco.org/projects/website-utilities/pdcalendar/pdcalendar

    Best of luck!

    Rich

     

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Oct 05, 2011 @ 17:39
    Lee Kelleher
    0

    Hi Simon, not sure if it's more useful, but take a look at the OpeningHours data-type.

    Cheers, Lee.

Please Sign in or register to post replies

Write your reply to:

Draft