monomer-1.5.0.0: A GUI library for writing native Haskell applications.
Copyright(c) 2018 Francisco Vallarino
LicenseBSD-3-Clause (see the LICENSE file)
Maintainerfjvallarino@gmail.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Monomer.Widgets.Singles.DateField

Description

Input field for dates types with support for valid ranges, different formats and separators.

dateField dateLens

With configuration options:

dateField_ dateLens [dateFormatMMDDYYYY, dateFormatDelimiter '-']

Supports the Day type of the time library, but other types can be supported by implementing DayConverter. Maybe is also supported.

Handles mouse wheel and shift + vertical drag to increase/decrease days.

Synopsis

Configuration

data DateFieldCfg s e a Source #

Configuration options for dateField:

Instances

Instances details
Monoid (DateFieldCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

Methods

mempty :: DateFieldCfg s e a #

mappend :: DateFieldCfg s e a -> DateFieldCfg s e a -> DateFieldCfg s e a #

mconcat :: [DateFieldCfg s e a] -> DateFieldCfg s e a #

Semigroup (DateFieldCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

Methods

(<>) :: DateFieldCfg s e a -> DateFieldCfg s e a -> DateFieldCfg s e a #

sconcat :: NonEmpty (DateFieldCfg s e a) -> DateFieldCfg s e a #

stimes :: Integral b => b -> DateFieldCfg s e a -> DateFieldCfg s e a #

Default (DateFieldCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

Methods

def :: DateFieldCfg s e a #

CmbReadOnly (DateFieldCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

CmbResizeOnChange (DateFieldCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

CmbSelectOnFocus (DateFieldCfg s e a) Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

CmbCaretMs (DateFieldCfg s e a) Millisecond Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

CmbCaretWidth (DateFieldCfg s e a) Double Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

CmbDragRate (DateFieldCfg s e a) Double Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

Methods

dragRate :: Double -> DateFieldCfg s e a Source #

FormattableDate a => CmbMaxValue (DateFieldCfg s e a) a Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

Methods

maxValue :: a -> DateFieldCfg s e a Source #

FormattableDate a => CmbMinValue (DateFieldCfg s e a) a Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

Methods

minValue :: a -> DateFieldCfg s e a Source #

CmbValidInput (DateFieldCfg s e a) s Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

Methods

validInput :: ALens' s Bool -> DateFieldCfg s e a Source #

CmbValidInputV (DateFieldCfg s e a) e Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

Methods

validInputV :: (Bool -> e) -> DateFieldCfg s e a Source #

CmbWheelRate (DateFieldCfg s e a) Double Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

Methods

wheelRate :: Double -> DateFieldCfg s e a Source #

WidgetEvent e => CmbOnBlur (DateFieldCfg s e a) e Path Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

Methods

onBlur :: (Path -> e) -> DateFieldCfg s e a Source #

WidgetEvent e => CmbOnChange (DateFieldCfg s e a) a e Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

Methods

onChange :: (a -> e) -> DateFieldCfg s e a Source #

WidgetEvent e => CmbOnFocus (DateFieldCfg s e a) e Path Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

Methods

onFocus :: (Path -> e) -> DateFieldCfg s e a Source #

CmbOnBlurReq (DateFieldCfg s e a) s e Path Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

Methods

onBlurReq :: (Path -> WidgetRequest s e) -> DateFieldCfg s e a Source #

CmbOnChangeReq (DateFieldCfg s e a) s e a Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

Methods

onChangeReq :: (a -> WidgetRequest s e) -> DateFieldCfg s e a Source #

CmbOnFocusReq (DateFieldCfg s e a) s e Path Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

Methods

onFocusReq :: (Path -> WidgetRequest s e) -> DateFieldCfg s e a Source #

type FormattableDate a = (Eq a, Ord a, Show a, DateTextConverter a, Typeable a) Source #

Constraints for date types accepted by dateField.

class (Eq a, Ord a, Show a, Typeable a) => DayConverter a where Source #

Converter to and form the Day type of the time library. To use types other than Day of said library, this typeclass needs to be implemented. -

Instances

Instances details
DayConverter Day Source # 
Instance details

Defined in Monomer.Widgets.Singles.DateField

class DateTextConverter a where Source #

Converts a Day instance to and from Text. Implementing this typeclass is not necessary for instances of DayConverter.

Constructors

dateField :: (FormattableDate a, WidgetEvent e) => ALens' s a -> WidgetNode s e Source #

Creates a date field using the given lens.

dateField_ :: (FormattableDate a, WidgetEvent e) => ALens' s a -> [DateFieldCfg s e a] -> WidgetNode s e Source #

Creates a date field using the given lens. Accepts config.

dateFieldV :: (FormattableDate a, WidgetEvent e) => a -> (a -> e) -> WidgetNode s e Source #

Creates a date field using the given value and onChange event handler.

dateFieldV_ :: (FormattableDate a, WidgetEvent e) => a -> (a -> e) -> [DateFieldCfg s e a] -> WidgetNode s e Source #

Creates a date field using the given value and onChange event handler. Accepts config.

dateFieldD_ :: (FormattableDate a, WidgetEvent e) => WidgetData s a -> [DateFieldCfg s e a] -> WidgetNode s e Source #

Creates a date field providing a WidgetData instance and config.

dateFormatDelimiter :: Char -> DateFieldCfg s e a Source #

Which character should be used to delimit dates.

dateFormatDDMMYYYY :: DateFieldCfg s e a Source #

Date format DDMMYYYY, using the appropriate delimiter.

dateFormatMMDDYYYY :: DateFieldCfg s e a Source #

Date format MMDDYYYY, using the appropriate delimiter.

dateFormatYYYYMMDD :: DateFieldCfg s e a Source #

Date format YYYYMMDD, using the appropriate delimiter.