amplify-studio icon indicating copy to clipboard operation
amplify-studio copied to clipboard

AWSDateTime formatting in Studio

Open Jshhhh opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. From AWS Amplify Discord @bluevalhalla

I have a UI component modified from the StandardCard provided in the Amplify Studio/Figma examples. If I connect it to a text field using the label prop, it pints out an unformatted test string like: 2022-07-29T10:09:01Z. How can I get this to format to something like July 29, 2022 9:01? Localized to the users time zone would be even better!

Describe the solution you'd like

I want to display an AWSDateTime from my data model (images.date) in a user friendly format within the card.

Jshhhh avatar Aug 09 '22 15:08 Jshhhh

You need to create slot for that and then need to bind it from code with your date format image

JayRajparaPraxus avatar Apr 16 '24 06:04 JayRajparaPraxus