NAME

Krang::ElementClass::Time - A popup time chooser like the one used for cover_date


SYNOPSIS

  # in your element's new() method's %args hash's 'children' arrayref:
  sub new {
    my $pkg = shift;
    my %args = ( 
      name      => 'some_container', 
      children  => [
        ..., 
        pkg('ElementClass::Time')->new( 
          name          => 'my_time',
          min           => 1, 
          max           => 1, 
          reorderable   => 0,
          allow_delete  => 0,
          indexed       => 1,
          default       => Time::Piece->new + (60 * 60), # one hour from now
        ),
        ..,
        @_, 
      ],
    );
    return $self->SUPER::new(%args);
  }


DESCRIPTION

Provides time fields (hour minute and am/pm) combined into a single element.


INTERFACE

All the normal Krang::ElementClass attributes are available. The data() field for elements of this class stores a Time::Piece object.

The XML format for the data of this element in an ISO-8601 date-time.