
Security News
New React Server Components Vulnerabilities: DoS and Source Code Exposure
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.
netlify-cms-widget-datetimezone
Advanced tools
This widget provides the datetimezone widget to store date, time, and timezone data for working with dates and times internationally. It was developed for conference.jamfire.io and was designed to use with Luxon.
Add the package to your project.
yarn add netlify-cms-widget-datetimezone
Configure Netlify CMS to use the widget.
// import libs
import CMS, { init } from "netlify-cms-app";
import {
DateTimeZoneControl,
DateTimeZonePreview,
} from "netlify-cms-widget-datetimezone";
// register datetimezone widget
CMS.registerWidget("datetimezone", DateTimeZoneControl, DateTimeZonePreview);
Add the widget to a field.
fields:
- { name: "datetimezone", label: "Start Time", widget: "datetimezone" }
// import libs
import React from 'react';
import { DateTime } from "luxon";
/**
* DateComponent
* @param {string} datetime
* @param {string} timezone
* @param {string} locale
*/
const DateComponent = ({ datetime, timezone, locale }) => {
// get the entry datetime and timezone
const datetimeOriginal = DateTime
.fromISO(datetime, { zone: timezone })
// display datetime as a local date to your visitors
const datetimeLocal = DateTime
.fromISO(datetime, {
zone: Intl.DateTimeFormat().resolvedOptions().timeZone
})
// display datetime in an i18n localized format
const datetimeLocalized = DateTime
.fromISO(dateTime, {
zone: { zone: timezone }
})
.setLocale(locale))
return(
<p>
Entry DateTime: {datetime.toLocaleString(DateTime.DATETIME_FULL)}<br />
Local DateTime: {datetimeLocal.toLocaleString(DateTime.DATETIME_FULL)}<br />
Localized DateTime: {datetimeLocalized.toLocaleString(DateTime.DATETIME_FULL)}
</p>
)
}
See CHANGELOG.md
See CONTRIBUTING.md
FAQs
DateTime with Timezone Netlify CMS Widget
We found that netlify-cms-widget-datetimezone demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.