From 74062d4a342cba741ecadf88762321cafcffb69c Mon Sep 17 00:00:00 2001 From: Cassidy Dingenskirchen Date: Sun, 29 Jun 2025 16:45:30 +0200 Subject: /journey/add: datetime inputs --- lib/Travelynx/Controller/Traveling.pm | 2 +- templates/add_journey.html.ep | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm index fd2abb1..f9b608c 100755 --- a/lib/Travelynx/Controller/Traveling.pm +++ b/lib/Travelynx/Controller/Traveling.pm @@ -2518,7 +2518,7 @@ sub add_journey_form { if ( $self->param('action') and $self->param('action') eq 'save' ) { my $parser = DateTime::Format::Strptime->new( - pattern => '%d.%m.%Y %H:%M', + pattern => '%FT%H:%M', locale => 'de_DE', time_zone => 'Europe/Berlin' ); diff --git a/templates/add_journey.html.ep b/templates/add_journey.html.ep index cade37e..1bc568e 100644 --- a/templates/add_journey.html.ep +++ b/templates/add_journey.html.ep @@ -69,12 +69,12 @@
- %= text_field 'sched_departure', id => 'sched_departure', class => 'validate', required => undef, pattern => '[0-9][0-9]?[.][0-9][0-9]?[.][0-9][0-9][0-9][0-9] +[0-9][0-9]:[0-9][0-9]' - + %= datetime_field 'sched_departure', id => 'sched_departure', class => 'validate', required => undef +
- %= text_field 'rt_departure', id => 'rt_departure', class => 'validate', pattern => '[0-9][0-9]?[.][0-9][0-9]?[.][0-9][0-9][0-9][0-9] +[0-9][0-9]:[0-9][0-9]' - + %= datetime_field 'rt_departure', id => 'rt_departure', class => 'validate' +
@@ -83,12 +83,12 @@
- %= text_field 'sched_arrival', id => 'sched_arrival', class => 'validate', required => undef, pattern => '[0-9][0-9]?[.][0-9][0-9]?[.][0-9][0-9][0-9][0-9] +[0-9][0-9]:[0-9][0-9]' - + %= datetime_field 'sched_arrival', id => 'sched_arrival', class => 'validate', required => undef +
- %= text_field 'rt_arrival', id => 'rt_arrival', class => 'validate', pattern => '[0-9][0-9]?[.][0-9][0-9]?[.][0-9][0-9][0-9][0-9] +[0-9][0-9]:[0-9][0-9]' - + %= datetime_field 'rt_arrival', id => 'rt_arrival', class => 'validate' +
-- cgit v1.2.3