CometChatDate is a widget which is used to show the date and time. You can also customize the appearance of this widget by modifying its logic.
Properties
dateStyle
Styling properties and values of the elementUsage
- HTML
- JavaScript
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
CometChatDate is a widget which is used to show the date and time. You can also customize the appearance of this widget by modifying its logic.
| Name | Type | Description |
|---|---|---|
| timestamp | number | Timestamp to be displayed in unix format |
| pattern | DatePatterns | Group of constants representing the in-built date patterns |
| customDateString | string | Override the in-built pattern with your custom representation of the timestamp |
| dateStyle | dateStyle | Styling properties and values of the Date component |
| Name | Description |
|---|---|
| width | Sets the width of the element |
| height | Sets the height of the element |
| border | Sets the border of the element |
| borderRadius | Sets the border radius of the element |
| background | Sets all background style properties at once, such as color, image, origin and size, or repeat method. Reference link |
| textFont | Sets all the different properties of font for the date text. Reference link |
| textColor | Sets the foreground color of the date text. |
<!-- make use of the element; format the timestamp to the in-built time pattern -->
<cometchat-date
[timestamp]="'1686234301'"
[pattern]="datePattern"
></cometchat-date>
import { DatePatterns } from 'uikit-resources'; //import the date pattern constant.
public datePattern: DatePatterns = DatePatterns.DateTime;
Was this page helpful?