DateTime property to store recurring events

Vote:
 

Hi,

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?

#193311
May 28, 2018 15:43
Vote:
 

Hi,

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.

#193316
May 28, 2018 17:50
Vote:
 

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.

#193364
May 29, 2018 14:01
Vote:
 

string property and store as cron expression :)

#193532
May 30, 2018 19:00
Vote:
 

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; }
#194521
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.