Class: AlDate

Inherits:
AlTimestamp show all
Defined in:
lib/al_form.rb

Overview

Note:

日付ウィジェット

年月日を扱う内部的には時刻を0時に固定したTimeオブジェクトで保存する。

Constant Summary collapse

STRFTIME_FORMAT =
"%Y-%m-%d"

Instance Attribute Summary

Attributes inherited from AlTimestamp

#max, #min

Attributes inherited from AlWidget

#filter, #foreign, #hidden, #label, #message, #name, #required, #tag_attr, #tag_type, #value, #value_format

Instance Method Summary collapse

Methods inherited from AlTimestamp

#make_tag, #make_value, #validate

Methods inherited from AlWidget

#make_tag, #make_value, #set_attr, #set_value

Constructor Details

#initialize(name, arg = {}) ⇒ AlDate

(AlDate) constructor

Parameters:

  • name (String)

    ウィジェット識別名 英文字を推奨

  • arg (Hash) (defaults to: {})

    引数ハッシュ

See Also:



1638
1639
1640
1641
# File 'lib/al_form.rb', line 1638

def initialize( name, arg = {} )
  super( name, arg )
  @value = normalize( @value )  if @value.class == Time
end