1.0.9 • Published 6 months ago

@xuda.io/xuda-ui-plugin-moment v1.0.9

Weekly downloads
-
License
Proprietary softw...
Repository
-
Last release
6 months ago

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

  1. Go to the Plugins tab in your Xuda project node at Xuda.io.
  2. Search for the Moment.js Xuda Plugin.
  3. Install the plugin by toggling the activation switch.

Usage in Xuda Studio

  1. Open Xuda Studio on Xuda.io.
  2. Select a UI component in your project.
  3. Scroll down the Properties Pane to locate the plugin options.
  4. Activate the plugin and configure the properties as required.

Properties

PropertyTypeDescriptionDefault Value
moment_formatstringSpecifies the date format (using Moment.js syntax).YYYY-MM-DD HH:mm:ss
moment_localestringSelects the locale for date formatting.en
moment_show_current_timebooleanEnables real-time updates to show the current time in the defined format.false
moment_relative_timebooleanDisplays time in a relative format (e.g., "2 hours ago").false
moment_calendar_timebooleanDisplays 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: English
  • he: Hebrew
  • fr: French
  • es: Spanish
  • de: German
  • ru: Russian
  • zh-cn: Chinese (Simplified)
  • ja: Japanese
  • ko: 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

PropertyValue
moment_formatMMMM Do YYYY, h:mm:ss a
moment_localehe
moment_show_current_timetrue