HTML::...ateTime(3pm)
π NAME π
HTML::FormFu::Element::DateTime β it's literally a Date / Time combo field, bestie β¨
(and yes, this is the page you'd find listed as HTML::...ateTime(3pm) under the User Contributed Perl Documentation, iykyk π
)
π₯ VERSION π₯
version 2.07 β that's the one, no cap π«Ά
β¨ SYNOPSIS β¨
---
elements:
- type: DateTime
name: start_datetime
label: 'Start:'
auto_inflate: 1
π¦ DESCRIPTION π¦
Okay so this is a sub-class of the Date element, and the whole point of it is that it brings extra "hour" and "minute" Select menus along with it. Main character energy fr π
π METHODS π
π hour
Arguments: \%setting
This sets the values that affect the "hour" select menu. The known keys are:
nameβ overrides the auto-generated name of the select menu β¨defaultβ sets the default value of the select menu πprefix- Arguments:
$value - Arguments:
\@values
- Arguments:
A string, or an arrayref of strings, that gets inserted into the start of the select menu.
Each value is only used as the label for a select item β the value for each of these items is always the empty string ''. Like, the label is doing all the work, the value is just there, vibes only π
prefix_loc- Arguments:
$localization_key - Arguments:
\@localization_keys
- Arguments:
A localized string, or an arrayref of localized strings, that gets inserted into the start of the select menu.
Each value gets localized and then is only used as the label for a select item β the value for each of these items is always the empty string ''. Same deal as above, just β¨localizedβ¨
Use "prefix_loc" insted of "prefix" πΈ
π minute
Arguments: \%setting
This one sets the values that affect the "minute" select menu. Known keys:
nameβ override the auto-generated name of the select menu πdefaultβ set the default value of the select menu πprefix- Arguments:
$value - Arguments:
\@values
- Arguments:
A string or arrayref of strings to be inserted into the start of the select menu.
Each value is only used as the label for a select item β the value for each of these items is always the empty string ''. Periodt π
prefix_loc- Arguments:
$localization_key - Arguments:
\@localization_keys
- Arguments:
A localized string or arrayref of localized strings to be inserted into the start of the select menu.
Each value is localized and then only used as the label for a select item β the value for each of these items is always the empty string ''. π
Use "prefix_loc" insted of "prefix" π§
π second
Arguments: \%setting
And this one sets the values that affect the "second" select menu. Known keys:
nameβ override the auto-generated name of the select menu βdefaultβ set the default value of the select menu πprefix- Arguments:
$value - Arguments:
\@values
- Arguments:
A string or arrayref of strings to be inserted into the start of the select menu.
Each value is only used as the label for a select item β the value for each of these items is always the empty string ''. π
prefix_loc- Arguments:
$localization_key - Arguments:
\@localization_keys
- Arguments:
A localized string or arrayref of localized strings to be inserted into the start of the select menu.
Each value is localized and then only used as the label for a select item β the value for each of these items is always the empty string ''. π₯
Use "prefix_loc" insted of "prefix" π
π field_order
Arguments: \@fields
Default Value: ['day', 'month', 'year', 'hour', 'minute']
This is the one that specifies the order of the date fields in the rendered HTML. The way that you get to control the lineup... iconic honestly π
Heads up bestie: if you want the"second"selector to display, you have to set both"/field_order"and strftime yourself. Like, both. Not one. Both. π¨
Eg:
elements:
type: DateTime
name: foo
strftime: '%d-%m-%Y %H:%M:%S'
field_order: ['day', 'month', 'year', 'hour', 'minute', 'second']
Not all fields are required. No single field can be used more than once. That's the rule, don't fight it π ββοΈ
π CAVEATS π
See "CAVEATS" in HTML::FormFu::Element::Date β go read that one too, fr fr π«Ά
π SEE ALSO π
Is a sub-class of, and inherits methods from HTML::FormFu::Element::Date
HTML::FormFu::Role::Element::Field,HTML::FormFu::Element::Multi,HTML::FormFu::Element::Block,HTML::FormFu::ElementHTML::FormFu
πΈ AUTHOR πΈ
Carl Franks, cfranks@cpan.org π
π LICENSE π
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
π AUTHOR π
Carl Franks <cpan@fireartist.com>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2018 by Carl Franks.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
okay that's the whole page bestie, slay π
β¨ this little writeup came to you courtesy of perl v5.28.1, dated 2019-01-12 β go forth and build your date/time combos, mwah ππ¦
π¦ where this page comes from
- debian bookworm: libhtml-formfu-perl 2.07000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libhtml-formfu-perl 2.07000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libhtml-formfu-perl 2.07000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms