Class TwDateTimeFormatOptions
- Namespace
- TwBlazor.Configuration
- Assembly
- TwBlazor.dll
The date and time formats TwBlazor components render with. Every value is optional and is a .NET custom or standard date and time format string.
public class TwDateTimeFormatOptions
- Inheritance
-
TwDateTimeFormatOptions
- Inherited Members
Remarks
A value set here always wins. Otherwise the matching Format_ entry of a resource file is used when it has
a value, and failing that the culture's own pattern.
Constructors
TwDateTimeFormatOptions()
public TwDateTimeFormatOptions()
Properties
DateInput
Gets or sets the format the date pickers type and parse. Defaults to the theme's DefaultFormat.
public string? DateInput { get; set; }
Property Value
DateTimeInput
Gets or sets the format the date time pickers type and parse. Defaults to the theme's DefaultDateTimeFormat or DefaultDateTimeFormat12Hour.
public string? DateTimeInput { get; set; }
Property Value
FirstDayOfWeek
Gets or sets the day calendars and date pickers start the week on. Defaults to the culture's FirstDayOfWeek.
public DayOfWeek? FirstDayOfWeek { get; set; }
Property Value
Hour
Gets or sets the format of an hour label in the calendar's time gutter. Defaults to h tt on a 12 hour
clock and HH:mm on a 24 hour one.
public string? Hour { get; set; }
Property Value
LongDate
Gets or sets the format of a full date, used for the accessible name of a day. Defaults to the culture's long date pattern.
public string? LongDate { get; set; }
Property Value
MediumDate
Gets or sets the format of an abbreviated date. Defaults to d MMM yyyy.
public string? MediumDate { get; set; }
Property Value
Month
Gets or sets the format of a month on its own. Defaults to MMMM.
public string? Month { get; set; }
Property Value
MonthDay
Gets or sets the format of a day and month without the year. Defaults to d MMM.
public string? MonthDay { get; set; }
Property Value
MonthYear
Gets or sets the format of a month and year heading. Defaults to the culture's year month pattern.
public string? MonthYear { get; set; }
Property Value
ShortMonth
Gets or sets the format of an abbreviated month. Defaults to MMM.
public string? ShortMonth { get; set; }
Property Value
ShortTime
Gets or sets the format of a time of day, for example HH:mm. Defaults to the culture's short time pattern.
public string? ShortTime { get; set; }
Property Value
TimeInput
Gets or sets the format the time pickers type and parse. Defaults to hh:mm tt on a 12 hour clock and
HH:mm on a 24 hour one.
public string? TimeInput { get; set; }
Property Value
Use12HourClock
Gets or sets whether times use a 12 hour clock with an AM/PM designator.
public bool? Use12HourClock { get; set; }
Property Value
- bool?
Remarks
Left unset, displayed times (such as the calendar's) follow the culture, and the time pickers stay on a
24 hour clock unless their own Is12HourFormat parameter says otherwise.
WeekdayDay
Gets or sets the format of a week view column heading. Defaults to ddd d.
public string? WeekdayDay { get; set; }
Property Value
Year
Gets or sets the format of a year. Defaults to yyyy.
public string? Year { get; set; }
Property Value
Methods
UseCultureInputFormats(CultureInfo)
Copies the culture's own patterns into the picker input formats, so the date and time pickers type and parse
the way the culture writes dates (for example M/d/yyyy and h:mm tt for en-US).
public TwDateTimeFormatOptions UseCultureInputFormats(CultureInfo culture)
Parameters
cultureCultureInfoThe culture to take the patterns from.
Returns
- TwDateTimeFormatOptions
These options, so calls can be chained.