Skip to content

TimeEditorAttribute class

namespace: Serenity.ComponentModel   assemblySerenity.Net.Core

Indicates that the target property should use a "Time (HH:mm)" editor. The editor does not support editing seconds or milliseconds. It is a simple dropdown editor that allows selecting a time between StartHour and EndHour. Note that this editor type returns an integer value that is the number of minutes from midnight. Use it only with Integer-typed fields. You may use the multiplier option to store seconds (60) or milliseconds (60000). Use TimeSpanEditor for TimeSpan fields.

[AttributeUsage(AttributeTargets.All)]
public class TimeEditorAttribute : CustomEditorAttribute

Public Members

name description
TimeEditorAttribute() Initializes a new instance of the TimeEditorAttribute class.
EndHour { get; set; } Gets or sets the end hour between 0 and 23.
IntervalMinutes { get; set; } Gets or sets the interval minutes.
Multiplier { get; set; } Gets or sets the multiplier (default is 1 which is minutes, 60 to store seconds, 60000 to store ms)
NoEmptyOption { get; set; } Gets or sets a value indicating whether the empty option should be hidden.
StartHour { get; set; } Gets or sets the start hour between 0 and 23.
const Key Editor type key

See Also