diff options
| author | Cassidy Dingenskirchen <admin@15318.de> | 2025-06-29 16:47:53 +0200 | 
|---|---|---|
| committer | Cassidy Dingenskirchen <admin@15318.de> | 2025-06-29 16:47:53 +0200 | 
| commit | 7ac6d22b4faee90e98589fb827708a84f6e77bfc (patch) | |
| tree | 2864f6657f3f3c9dd0a81e746e61f08b9046633f | |
| parent | 02a6b9072d16c521142f04f5dd4a316aa269a5de (diff) | |
/history/map: date inputs
| -rwxr-xr-x | lib/Travelynx/Controller/Traveling.pm | 8 | ||||
| -rw-r--r-- | templates/history_map.html.ep | 8 | 
2 files changed, 7 insertions, 9 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm index 4c58c0e..5ecfcc0 100755 --- a/lib/Travelynx/Controller/Traveling.pm +++ b/lib/Travelynx/Controller/Traveling.pm @@ -1745,13 +1745,12 @@ sub map_history {  	my $with_polyline = $route_type eq 'beeline' ? 0 : 1;  	my $parser = DateTime::Format::Strptime->new( -		pattern   => '%d.%m.%Y', +		pattern   => '%F',  		locale    => 'de_DE',  		time_zone => 'Europe/Berlin'  	); -	if (    $filter_from -		and $filter_from =~ m{ ^ (\d+) [.] (\d+) [.] (\d+) $ }x ) +	if ( $filter_from )  	{  		$filter_from = $parser->parse_datetime($filter_from);  	} @@ -1759,8 +1758,7 @@ sub map_history {  		$filter_from = undef;  	} -	if (    $filter_until -		and $filter_until =~ m{ ^ (\d+) [.] (\d+) [.] (\d+) $ }x ) +	if ( $filter_until )  	{  		$filter_until = $parser->parse_datetime($filter_until)->set(  			hour   => 23, diff --git a/templates/history_map.html.ep b/templates/history_map.html.ep index c2ff9ed..6620cb2 100644 --- a/templates/history_map.html.ep +++ b/templates/history_map.html.ep @@ -88,14 +88,14 @@  	</p>  	<div class="row">  		<div class="input-field col s12"> -			%= text_field 'filter_from', id => 'filter_from', 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])?' -			<label for="filter_from">Abfahrt ab (DD.MM.YYYY)</label> +			%= date_field 'filter_from', id => 'filter_from', class => 'validate' +			<label for="filter_from" class="active">Abfahrt ab</label>  		</div>  	</div>  	<div class="row">  		<div class="input-field col s12"> -			%= text_field 'filter_to', id => 'filter_to', 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])?' -			<label for="filter_to">Abfahrt bis (DD.MM.YYYY)</label> +			%= date_field 'filter_to', id => 'filter_to', class => 'validate' +			<label for="filter_to" class="active">Abfahrt bis</label>  		</div>  	</div>  	<div class="row">  | 
