@xuda.io/xuda-ui-plugin-moment
v1.0.6
Published
The Moment.js Xuda plugin enables dynamic date and time formatting with localization support, real-time updates, and custom formats. It simplifies date manipulation, integrates seamlessly with Xuda, and supports multiple languages, including Hebrew, for e
Downloads
339
Maintainers
Readme
Moment.js Xuda Plugin
The Moment.js Xuda Plugin provides powerful date and time formatting, localization, and real-time updates for seamless integration with Xuda UI. It allows you to enhance your application with customizable date manipulation and multilingual support, including Hebrew.
Features
- Customizable Date Formats: Format dates and times using Moment.js syntax (e.g.,
YYYY-MM-DD HH:mm:ss
). - Multilingual Localization: Supports numerous locales, including English, Hebrew, French, Spanish, and more.
- Real-time Updates: Optionally enable live current time updates in the defined format.
- Xuda Integration: Works natively with Xuda UI properties for effortless configuration and rendering.
Installation on Xuda Platform
- Go to the Plugins tab in your Xuda project node at Xuda.io.
- Search for the Moment.js Xuda Plugin.
- Install the plugin by toggling the activation switch.
Usage in Xuda Studio
- Open Xuda Studio on Xuda.io.
- Select a UI component in your project.
- Scroll down the Properties Pane to locate the plugin options.
- Activate the plugin and configure the properties as required.
Properties
| Property | Type | Description | Default Value |
| -------------------------- | --------- | ------------------------------------------------------------------------- | --------------------- |
| moment_format
| string
| Specifies the date format (using Moment.js syntax). | YYYY-MM-DD HH:mm:ss
|
| moment_locale
| string
| Selects the locale for date formatting. | en
|
| moment_show_current_time
| boolean
| Enables real-time updates to show the current time in the defined format. | false
|
| moment_relative_time
| boolean
| Displays time in a relative format (e.g., "2 hours ago"). | false
|
| moment_calendar_time
| boolean
| Displays time in a calendar format (e.g., "Today at 2:30 PM"). | false
|
Supported Locales
The plugin supports a wide range of locales, including:
en
: Englishhe
: Hebrewfr
: Frenches
: Spanishde
: Germanru
: Russianzh-cn
: Chinese (Simplified)ja
: Japaneseko
: Korean
For a complete list of locales, visit the Moment.js Locale Documentation.
Example Configuration
1. Moment.js Date Display
- Format:
MMMM Do YYYY, h:mm:ss a
- Locale: Hebrew (
he
) - Live Updates: Enabled
2. Properties Pane in Xuda Studio
| Property | Value |
| -------------------------- | ------------------------- |
| moment_format
| MMMM Do YYYY, h:mm:ss a
|
| moment_locale
| he
|
| moment_show_current_time
| true
|