Forum Academy Marketplace Showcase Pricing Features

Format the date picker

I have tried to format the date picker so that the month is spelt out, ie: September 12, 2021 (instead of 12/09/2021).

But the initial content I used turns red and I can’t get anything to work?

Have you checked out the air date/time picker plugin? I think you can set up the picker to have that format

That’s because the Initial content property expects a Bubble date data type, and you’re providing a text type. (Using :formatted as returns a “string” - i.e. text type.)

The solution is simple. Just edit the style for that element. What you are seeing is just the default style for the Date/Time Picker element, but it can be changed.


 
 

-Steve

2 Likes

Thanks Steve, that was a great (simple) solution. Whilst I am here, I had another question; the time defaults to 12:00 and I want to to default to either the users current time or 00:00 - do you know how that can be done?

I did check it out but for some reason I opted against it - I can’t remember my reasons as was a while ago. Thanks for suggestion though.

That’s what the Initial content property is for. It allows you to specify the default value for the input. Just set it to the desired date/time. Use the Change hours|minutes|seconds to expressions to set a specific time; or use the Current date/time expression for the user’s current date and time. See the docs for details.

-Steve

Thank you!

this solved my issue just now - @shot thanks for explaining this