PaackEng / paack-ui / UI.Utils.DateInput

Required type for comparing and validating date inputs.

Internal types


type alias DateInput =
UI.Internal.DateInput.DateInput

DateInput.DateInput is used for describing dates in the UI.


type alias PeriodComparison =
UI.Internal.DateInput.PeriodComparison

DateInput.PeriodComparison is used to compare date and time ranges.

Useful record


type alias PeriodDate =
{ date : DateInput
, comparison : PeriodComparison 
}

DateInput.PeriodDate is used to contain both date and comparison information.


type alias RangeDate =
{ from : DateInput
, to : DateInput 
}

DateInput.RangeDate is used to describe a range of dates.

Transformation

toDD_MM_YYYY : String -> DateInput -> String

Transforms a string into a DateInput.DateInput

fromPosix : Time.Zone -> Time.Posix -> DateInput

Transform a time with time zone into a DateInput