Class: UU::OS::Form::Date
- Inherits:
-
Input
- Object
- GVC::Component
- Input
- UU::OS::Form::Date
- Defined in:
- uu_os_gvc-0.28.16/lib/uu/os/form/date.rb
Overview
Component for representation date and time values.
Instance Attribute Summary (collapse)
-
- (Object) type
Date component type.
-
- (Object) value
Component value.
Attributes inherited from Input
#data, #disabled, #read_only, #required, #submit_value_change, #value_change_action_uri, #width
Attributes inherited from GVC::Component
#attributes, #code, #component_type, #form, #height, #id, #name, #width
Method Summary
Methods inherited from GVC::Component
#add_message, #focus, #initialize, #messages
Constructor Details
This class inherits a constructor from UU::OS::GVC::Component
Instance Attribute Details
- (Object) type
Date component type. Defines representation of date and time value. Value have to be one from "date", "time" or "datetime"
11 12 13 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/form/date.rb', line 11 def type @type end |
- (Object) value
Component value. The value contains a date represented as a String in a ISO 8601 format, e.g. '2015-07-25T18:30:27+02:00'. However, if the component has type='date', shortened format containing only date part (no time part) is used, e.g. '2015-07-25'. It's recommended to use Time.parse(value) for all cases for proper date/time parsing.
18 19 20 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/form/date.rb', line 18 def value @value end |