TimeValue
Display a formatted time value
Source
Docs
Package
Usage
Use TimeValue
component to display time in different formats:
24h format: 18:45
12h format: 6:45 PM
With seconds
Use withSeconds
prop to display seconds:
12h format: 6:45:34 PM
24h format: 18:45:34
AM/PM labels
Use amPmLabels
prop to display AM/PM labels:
Custom AM/PM labels: 6:45 अपराह्न
Date object
You can use Date
object instead of string as value
:
24h format: 18:45
12h format: 6:45 PM