pub fn timezone_field<T>(name: T, message: Option<&'static str>) -> Div
where
    T: Into<Cow<'static, str>>,
{
    Div::new()
        .child(Label::new(
            message.unwrap_or("Please select your timezone:"),
        ))
        .child(
            Select::default()
                .attribute(Name::new(name))
                .children(TZ_VARIANTS.iter().map(|timezone| {
                    SelectOption::default()
                        .attribute(Value::new(timezone.to_string()))
                        .text(timezone.to_string())
                })),
        )
}
/// Creates a field from which a timezone can be selected which should be added to an existing form
/// (it is just an input field; not a free-standing form on its own).
Creates a field from which a timezone can be selected which should be added to an existing form
(it is just an input field; not a free-standing form on its own).
Creates a field from which a timezone can be selected which should be added to an existing form ( it is just an input field ; not a free - standing form on its own ) .
pub fn timezone_field<T>(name: T, message: Option<&'static str>) -> Div
where
    T: Into<Cow<'static, str>>,
{
    Div::new()
        .child(Label::new(
            message.unwrap_or("Please select your timezone:"),
        ))
        .child(
            Select::default()
                .attribute(Name::new(name))
                .children(TZ_VARIANTS.iter().map(|timezone| {
                    SelectOption::default()
                        .attribute(Value::new(timezone.to_string()))
                        .text(timezone.to_string())
                })),
        )
}
pub fn timezone_field < T > ( name : T , message : Option < & ' static str > ) -> Div where T : Into < Cow < ' static , str > > , { Div :: new ( ) . child ( Label :: new ( message . unwrap_or ( " " ) , ) ) . child ( Select :: default ( ) . attribute ( Name :: new ( name ) ) . children ( TZ_VARIANTS . iter ( ) . map ( | timezone | { SelectOption :: default ( ) . attribute ( Value :: new ( timezone . to_string ( ) ) ) . text ( timezone . to_string ( ) ) } ) ) , ) }
Creates a field from which a timezone can be selected which should be added to an existing form
(it is just an input field; not a free-standing form on its own).
Creates a field from which a timezone can be selected which should be added to an existing form ( it is just an input field ; not a free - standing form on its own ) .
name
T
message
Option<&'static str>