AI Integration Quick Reference
AI Integration Quick Reference
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: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
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.