Created on 15 November 2019
icon_unfollowing
Login to follow
client-side-datetime-conversion

Client-Side DateTime Conversion

Stable version 1.0.1 (Compatible with OutSystems 11)
Uploaded on 19 November 2019 by 
client-side-datetime-conversion

Client-Side DateTime Conversion

Details
Converts DateTimes and Times to the browser's local timezone using moment.js.
Read more

Contains 2 web blocks, DateTimeBlock and TimeBlock.  Use these in your Traditional Web screens and pass your DateTime or Time values to them, and they will render to the screen in the browser's local timezone.  Supports AJAX updates of DateTimes and Times as well.


In order to load the necessary supporting code, add a call to InitDateTimeConverter in your Theme's Layout's Preparation.


Important: If your server is not in UTC, adjust the Site Property "ServerTimeZone" in ClientSideDateTimeConverter to the name of the timezone your server is in (e.g. America/New_York, Europe/Lisbon, etc.)

Adjust other Site Properties to change how formatting is done, or if the time zone abbreviation will be shown after the time.  Default is in US date format with 12-hour time.


Uses moment.js and moment.js timezone

Release notes (1.0.1)

Added LocalTimeZoneBlock to show just the user's timezone

Added the ability to override the default DateTime or Time format in DateTimeBlock and TimeBlock

Reviews (0)
Category
User interface, Date, time & calendar
Tags
Support options
This asset is not supported by OutSystems. You may use the discussion forums to leave suggestions or obtain best-effort support from the community, including from  who created this asset.
Dependencies
Client-Side DateTime Conversion has no dependencies.
Application Objects
Client-Side DateTime Conversion has 0 AOs.
Team
Compatible with
Version 11
Database:
All
Asset consumers
No consumers yet.
Weekly downloads