struct DynFork::Fields::DateField
- DynFork::Fields::DateField
- DynFork::Fields::Field
- Struct
- Value
- Object
Overview
A field for entering a date.
Formats: dd-mm-yyyy | dd/mm/yyyy | dd.mm.yyyy |
yyyy-mm-dd | yyyy/mm/dd | yyyy.mm.dd
Included Modules
Defined in:
dynfork/fields/date.crConstructors
- .new(pull : JSON::PullParser)
- .new(label : String = "", default : String | Nil = nil, placeholder : String = "", max : String | Nil = nil, min : String | Nil = nil, hide : Bool = false, required : Bool = false, disabled : Bool = false, readonly : Bool = false, ignored : Bool = false, hint : String = "", warning : Array(String) = [I18n.t("formats.interpolation", samples: ("dd-mm-yyyy | dd/mm/yyyy | " + "dd.mm.yyyy | yyyy-mm-dd | ") + "yyyy/mm/dd | yyyy.mm.dd")])
Instance Method Summary
-
#default : String | Nil
Value by default.
-
#default? : String | Nil | Nil
Value by default.
-
#field_type : String
Field type - Structure Name.
-
#group : UInt8
To optimize field traversal in the
paladins/check()
method. -
#hint : String
Additional explanation for the user.
-
#input_type : String | Nil
Html tag: input type="date".
-
#input_type? : String | Nil | Nil
Html tag: input type="date".
-
#max : String | Nil
The top value for entering a date.
-
#max? : String | Nil | Nil
The top value for entering a date.
-
#min : String | Nil
The lower value for entering a date.
-
#min? : String | Nil | Nil
The lower value for entering a date.
-
#placeholder : String
Displays prompt text.
-
#readonly=(readonly : Bool)
Specifies that the field cannot be modified by the user.
-
#readonly? : Bool
Specifies that the field cannot be modified by the user.
-
#refrash_val_date(val : Time) : Nil
For the
DynFork::QPaladins::Tools#refrash_fields
method. -
#refrash_val_str(val : String) : Nil
For update the date in the string format.
-
#required? : Bool
Required field.
-
#time_object : Time | Nil
Get time object from value.
-
#value : String | Nil
Sets the value of an element.
-
#value=(value : String | Nil)
Sets the value of an element.
-
#value? : String | Nil | Nil
Sets the value of an element.
Instance methods inherited from module DynFork::Globals::Date
date_parse(date : String) : Time
date_parse,
datetime_parse(datetime : String) : Time
datetime_parse
Instance methods inherited from struct DynFork::Fields::Field
choices_from_json(json : String) : Nil
choices_from_json,
disabled=(disabled : Bool)
disabled=,
disabled? : Bool
disabled?,
errors : Array(String)
errors,
errors=(errors : Array(String))
errors=,
field_type : String
field_type,
group : UInt8
group,
hide=(hide : Bool)
hide=,
hide? : Bool
hide?,
hint : String
hint,
id : String
id,
id=(id : String)
id=,
ignored? : Bool
ignored?,
label : String
label,
name : String
name,
name=(name : String)
name=,
slug_sources : Array(String)
slug_sources,
warning : Array(String)
warning,
warning=(warning : Array(String))
warning=
Constructor methods inherited from struct DynFork::Fields::Field
new(pull : JSON::PullParser)
new
Constructor Detail
Instance Method Detail
To optimize field traversal in the paladins/check()
method.
WARNING It is recommended not to change.