Documentation Index
Fetch the complete documentation index at: https://cometchat-22654f5b-release-flutter-v5-stable.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
AI Integration Quick Reference
AI Integration Quick Reference
| Field | Value |
|---|---|
| Package | @cometchat/chat-uikit-angular |
| Key class | CometChatLocalize (global CalendarObject management) |
| Key component | CometChatDateComponent (cometchat-date element) |
| Required setup | CometChatUIKit.init(uiKitSettings) |
| Purpose | Customize date/time formatting globally, per-component, or per-language |
| Features | Language-specific defaults, global override, per-instance override, relative time |
| Related | Localization | Theming |
| Capability | Description |
|---|---|
| Language-specific defaults | Date formats auto-adapt per language (e.g., MM/DD/YYYY for en-US, DD/MM/YYYY for en-GB) |
| Global override | Set a custom CalendarObject that applies to all components |
| Per-component override | Pass a CalendarObject input to individual cometchat-date instances |
| Relative time | Configure “X minutes ago” style formatting |
| Timezone support | Set timezone globally via CometChatLocalize |
How It Works
Thecometchat-date component resolves its date format using a fallback chain:
- Component
[calendarObject]input (highest priority) - Global CalendarObject from
CometChatLocalize.getCalendarObject() - Hardcoded fallback:
hh:mm A/[Yesterday]/dddd/DD/MM/YYYY
Language-Specific Defaults
When you switch languages, date formats automatically adapt:| Language | Today | Yesterday | Other Days |
|---|---|---|---|
| en-US | hh:mm A | [Yesterday] | MM/DD/YYYY |
| en-GB | HH:mm | [Yesterday] | DD/MM/YYYY |
| de | HH:mm | [Gestern] | DD.MM.YYYY |
| fr | HH:mm | [Hier] | DD/MM/YYYY |
| es | HH:mm | [Ayer] | DD/MM/YYYY |
| ja | HH:mm | [昨日] | YYYY/MM/DD |
| ko | HH:mm | [어제] | YYYY/MM/DD |
| zh | HH:mm | [昨天] | YYYY/MM/DD |
| ru | HH:mm | [Вчера] | DD.MM.YYYY |
| sv | HH:mm | [Igår] | YYYY-MM-DD |
Global Date Format Override
Set a custom CalendarObject that applies to allcometchat-date instances:
Once you set a custom global CalendarObject, switching languages will NOT override it. Your custom format is preserved across language changes. To revert to language-specific defaults, you would need to reset the CalendarObject.
Via Initialization
Per-Component Override
Pass acalendarObject input to individual cometchat-date instances:
CalendarObject Reference
Format Tokens
| Token | Output | Example |
|---|---|---|
YYYY | 4-digit year | 2026 |
YY | 2-digit year | 26 |
MM | 2-digit month | 03 |
DD | 2-digit day | 23 |
dddd | Full weekday | Monday |
ddd | Short weekday | Mon |
HH | 24-hour hour | 14 |
hh | 12-hour hour | 02 |
mm | Minutes | 30 |
A | AM/PM | PM |
[text] | Literal text | [Yesterday] → Yesterday |
Relative Time
Enable “X minutes ago” style formatting:relativeTime is configured, recent messages show relative timestamps instead of absolute times.
Timezone
Example: Custom Date Formats
- Global Override
- Per-Component
Next Steps
Localization
Override translations globally or per-component.
Theming
Customize colors, fonts, and spacing.
Custom Message Types
Add custom message types with templates.
Global Config
Configure global UIKit settings.