primait/pyxis-components/7.1.0

NOTE: the latest version is 9.0.3

Prima.Pyxis.Form.Date

Configuration

type Date model msg

Represent the opaque Date configuration.

Configuration Methods

date : (model -> Date) -> (Date -> msg) -> Date model msg

Create an input[type="date"] with the default options.

Rendering

render : model -> Date model msg -> List (Html msg)

Renders the Date.

Options

withAttribute : Attribute msg -> Date model msg -> Date model msg

Sets an attribute to the Date.

withClass : String -> Date model msg -> Date model msg

Sets a class to the Date.

withDefaultValue : Date -> Date model msg -> Date model msg

Adds a default value to the Date. Useful to teach the component about it's pristine/touched state.

withDisabled : Bool -> Date model msg -> Date model msg

Sets a disabled to the Date.

withId : String -> Date model msg -> Date model msg

Sets an id to the Date.

withMediumSize : Date model msg -> Date model msg

Sets a size to the Date.

withSmallSize : Date model msg -> Date model msg

Sets a size to the Date.

withLargeSize : Date model msg -> Date model msg

Sets a size to the Date.

withName : String -> Date model msg -> Date model msg

Sets a name to the Date.

withPlaceholder : String -> Date model msg -> Date model msg

Sets a placeholder to the Date.

DatePicker Options

(model -> Maybe Model)
-> (Msg -> msg)
-> Date model msg
-> Date model msg

Adds a DatePicker to the Date. Remember to add the visibility policy with withDatePickerVisibility.

withDatePickerVisibility : (model -> Bool) -> Date model msg -> Date model msg

Adds a visibility policy to the DatePicker built via withDatePicker.

Event Options

withOnBlur : msg -> Date model msg -> Date model msg

Sets an onBlur event to the Date.

withOnFocus : msg -> Date model msg -> Date model msg

Sets an onFocus event to the Date.

withOnIconClick : msg -> Date model msg -> Date model msg

Sets an onClick event to the Date icon.

Validation

withValidation : (model -> Maybe Type) -> Date model msg -> Date model msg

Adds a Validation rule to the Date.