Skip to content
Discussion options

You must be logged in to vote

If it's ok to hold the value in its localized form, you can convert it initially and adjust the picker mask:

now = datetime.now()
date = ui.date_input('Date', value=datetime.strftime(now, '%d.%m.%Y'))
date.picker.props('mask="DD.MM.YYYY"')

If you want to hold the value in its original form but display it localized, you most probably need to implement your own value element. ui.date_input, which derives from ui.input, usually displays its underlying, untransformed value.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@falkoschindler
Comment options

@DylanBrianBenton
Comment options

Comment options

You must be logged in to vote
1 reply
@DylanBrianBenton
Comment options

Answer selected by DylanBrianBenton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants