1.0.2 • Published 9 years ago

react-widgets-moment-localizer v1.0.2

Weekly downloads
323
License
MIT
Repository
-
Last release
9 years ago

A date localization adapter for react-widgets using Momentjs. This only handles date localization, if you plan on using the NumberPicker widget you will still need to include Globalize.js or some other number localizer.

npm install react-widgets-moment-localizer

You can apply it by using the main module export, or the global object

var widgets = require('react-widgets') // or window.ReactWidgets
  , moment = require('moment')
  , momentLocalizer = require('react-widgets-moment-localizer')

widgets.configure.setDateLocalizer(momentLocalizer(moment));

//use the widgets

Or if you want to minimize the size of your build you can just require the configuration module

var configure = require('react-widgets/lib/configure')
  , moment = require('moment')
  , momentLocalizer = require('react-widgets-moment-localizer');

configure.setDateLocalizer(momentLocalizer(moment));

//use the widgets