Class DateRange
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
Represents a date range used by a MudDatePicker.
public class DateRange : Range<DateTime?>, IEquatable<DateRange>
- Inheritance
-
DateRange
- Implements
- Inherited Members
- Extension Methods
Constructors
DateRange()
Creates a new instance.
public DateRange()
DateRange(DateTime?, DateTime?)
Creates a new instance.
public DateRange(DateTime? start, DateTime? end)
Parameters
Methods
Equals(DateRange)
public bool Equals(DateRange other)
Parameters
otherDateRange
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToIsoDateString()
Formats this range as an ISO 8601 string.
public string ToIsoDateString()
Returns
- string
The formatted string.
ToString(Converter<DateTime?, string>)
Formats this range as a string.
public string ToString(Converter<DateTime?, string> converter)
Parameters
Returns
- string
The formatted string.
TryParse(string, Converter<DateTime?, string>, out DateRange)
Parses the specified string value into a date range.
public static bool TryParse(string value, Converter<DateTime?, string> converter, out DateRange date)
Parameters
valuestringA string with both the start and end dates.
converterConverter<DateTime?, string>The converter for parsing string values.
dateDateRangeThe result of the parse.
Returns
- bool
trueif the string was successfully interpreted as a date.
TryParse(string, string, Converter<DateTime?, string>, out DateRange)
Parses the specified string value into a date range.
public static bool TryParse(string start, string end, Converter<DateTime?, string> converter, out DateRange date)
Parameters
startstringThe minimum date to parse.
endstringThe maximum date to parse.
converterConverter<DateTime?, string>The converter for parsing string values.
dateDateRangeThe result of the parse.
Returns
- bool
trueif the string was successfully interpreted as a date.
Operators
operator ==(DateRange, DateRange)
public static bool operator ==(DateRange dateRange1, DateRange dateRange2)
Parameters
Returns
operator !=(DateRange, DateRange)
public static bool operator !=(DateRange dateRange1, DateRange dateRange2)