As long as it is a DateTime I don't think it matters.
Are you adding events directly to Umbraco backend, or are users adding them from the frontend?
How do you choose start- and end-date? Automatically or does the user choose anything? If there are som user input, then the issue probably is in the parsing of that.
The different languages use the same templates, so it's also the same partial that is used.
The code in it was this
@foreach(CalendarEvent ce in Calendar.getEvents(DateTime.Now.AddMonths(-12).Date, DateTime.Now.AddMonths(12).Date,"dates","Event",false)){
@ce.content.Name
}
This outputted the danish events, on both the danish and swedish site.
But when when I changed it to (added CurrentPage as StartNode)
@foreach(CalendarEvent ce in Calendar.getEvents(DateTime.Now.AddMonths(-12).Date, DateTime.Now.AddMonths(12).Date,"dates","Event",CurrentPage,false)){
@ce.content.Name
}
it solved it, now danish events are outputted on the danish site, and swedish events are outputted in the swedish site.
So everything works, and thanks for a great package.
StartDate and EndDate format in getEvent()
Is start- and enddate required to be in a specific format?
In a multi site solutions, events from the danish site is outputted, but not from the swedish.
The only difference is that the date format is different because of different culture
Danish 30-06-2014 00:00:00 30-06-2016 00:00:00
Swedish 2014-06-30 00:00:00 2016-06-30 00:00:00
I would like to test it by forcing in another format, by using
but to do that
is required, and that causes another problem, described in this post
https://our.umbraco.org/projects/website-utilities/ksumbraco7calendar/ksumbraco7calendar/67012-can-this-not-be-used-with-systemglobalization
Any thoughts or workarounds are appreciated.
As long as it is a DateTime I don't think it matters. Are you adding events directly to Umbraco backend, or are users adding them from the frontend? How do you choose start- and end-date? Automatically or does the user choose anything? If there are som user input, then the issue probably is in the parsing of that.
It could help me if you provide your code.
Yep, you're right, DateFormat does not matter...
The different languages use the same templates, so it's also the same partial that is used.
The code in it was this
This outputted the danish events, on both the danish and swedish site.
But when when I changed it to (added CurrentPage as StartNode)
it solved it, now danish events are outputted on the danish site, and swedish events are outputted in the swedish site.
So everything works, and thanks for a great package.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.