SaaS CMS has officially launched! Learn more now.

DateTime property to store recurring events



I have a question, if there is any option to store recurring events in EPi.

For example, I have an alarm that fires at 8.00 every Monday. Is there any way to do it with a DateTime property?

May 28, 2018 15:43


Not just ONE property. But you can combine datetime with e.g. the included weekday property EPiServer.SpecializedProperties.PropertyWeekDay.

If that's not enough you can create a list propery with the necessary properties, e.g. IList<Occurrence> where every Occurrence at least have a datetime propery.

May 28, 2018 17:50

Thank you very much for your answer, Johan.

You are right, it seems to be that I will need two fields. Still had some hope that EPi has done some tuning over their existing DateTime control...

WeekDay seems to be kind of obsolete by the way. Getting some kind of own Enum and SelectOne/Many will look much better.

May 29, 2018 14:01

string property and store as cron expression :)

May 30, 2018 19:00

The most convinient option for the content editors was option with two fields:

The dropdown for a day of the week based on he Enum

[SelectOne(SelectionFactoryType = typeof(EnumSelectionFactory<DayOfWeek, string>))]
public virtual string DayOfWeek { get; set; }

The string field for a time based on the DateTime client part

[ClientEditor(ClientEditingClass = "dijit/form/TimeTextBox")]
public virtual string Time { get; set; }
Jun 22, 2018 21:47
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.