Jump to:

10851 Posts in 2517 Topics by 1793 members

All other Modules

SilverStripe Forums » All other Modules » Event Calendar - StartTime and EndTime

Discuss all other Modules here.

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

Page: 1 2
Go to End
Author Topic: 2726 Views
  • bmc38119
    Avatar
    Community Member
    45 Posts

    Event Calendar - StartTime and EndTime Link to this post

    Uncle Cheese -

    Excellent event calendar module.

    I do have one question though. When I add an Event Date and Time, and then go back and edit them, the Start Time and End Times always show in Date Time format (which they should probably only the Time) AND the date is not the same as the entered Event Dates. See screenshot where the Event Start and End dates are both 9/16/2009, but the Start Time and End Times show 9/13/2009. Is there a way to correct this? I noticed that happens on your bluehouse demo as well.

    Thanks

    Attached Files
  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar - StartTime and EndTime Link to this post

    Make sure you're using

    CalendarDateTime::set_date_format('mdy') // or "dmy"
    CalendarDateTime::set_time_format("12") // or "24"
    DatePickerField::set_date_format('mdy') // or 'dmy'

  • bmc38119
    Avatar
    Community Member
    45 Posts

    Re: Event Calendar - StartTime and EndTime Link to this post

    still does not work. in fact, now that the date has changed this morning, the dates in front of the times have now changed to 9/14 - even though the actual start Date and End Dates are set to 9/7 (as before). It looks like it is pulling in the current date infront of the time in those 2 fields.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar - StartTime and EndTime Link to this post

    There's no such thing as a true "time" field in MySQL, as far as I know. There has to be a date attached to it. The date is irrelevant. I think the way SS handles time fields is just by adding hours to an arbitrary date, and in PHP that usually defaults to today.

    I should revise that to only display the time and not the date as well. Surprising to me that TimeField doesn't handle that out of the box, though.

  • bmc38119
    Avatar
    Community Member
    45 Posts

    Re: Event Calendar - StartTime and EndTime Link to this post

    thanks for the insight. i am so glad you could see what i was seeing. for now, i will just instruct the client to ignore that date when editing the time.

    thanks for all your help.

  • sajok
    Avatar
    Community Member
    82 Posts

    Re: Event Calendar - StartTime and EndTime Link to this post

    Hi,

    this thread is probably old but I have a similar problem with startTime and EndTime, and I'd like to know how you solved yours. When I add time in the format: 00h00 at the backend, the event's time fields show nothing as if nothing get saved. is it a problem with the format? if so where can I edit to add this format..

    SS 2.4.1

    thanks in advance.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar - StartTime and EndTime Link to this post

    I can't replicate that issue. When I enter 00:00, it saves as "00:00:00". Please replicate the problem on the demo site if you can:

    http://eventcalendar.bluehousegroup.com/admin
    admin/password

  • tuck
    Avatar
    Community Member
    2 Posts

    Re: Event Calendar - StartTime and EndTime Link to this post

    If I wanted to get just the StartTime to show on a template in 12 hour how would I go about doing that? I have used _Times and that works but shows both Start and EndTime. If I use $StartTime then it shows it in 24 hour.

    2726 Views
Page: 1 2
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.