1 package Reaction::UI::ViewPort::Field::Mutable::DateTime;
7 use namespace::clean -except => [ qw(meta) ];
8 extends 'Reaction::UI::ViewPort::Field::DateTime';
10 with 'Reaction::UI::ViewPort::Field::Role::Mutable::Simple';
11 sub adopt_value_string {
13 my $value = $self->value_string;
14 my ($epoch) = Time::ParseDate::parsedate($value);
16 my $dt = 'DateTime'->from_epoch( epoch => $epoch );
19 $self->value($self->value_string);
23 __PACKAGE__->meta->make_immutable;
31 Reaction::UI::ViewPort::Field::DateTime
39 Accessor for the string representation of the DateTime object.
41 =head2 value_string_default_format
43 By default it is set to "%F %H:%M:%S".
49 =head2 L<Reaction::UI::ViewPort::Field>
53 See L<Reaction::Class> for authors.
57 See L<Reaction::Class> for the license.