1.0.13 • Published 1 year ago
react-date-timer-moment v1.0.13
About Package
The react-date-timer-moment NPM package is a lightweight and easy-to-use solution for adding real-time date and time functionality to your web applications. With a simple integration, you can showcase the current date and time to your users, dynamically updating without the need for page refreshes. Customize the display format, time zones, and styling effortlessly, providing a seamless and informative experience. Enhance your user interfaces with this package to keep your audience informed and engaged with accurate, live date and time information.
Install
npm install react-date-timer-moment --save
how to use DateTimer
import React from "react";
import { DateTimer } from 'react-date-timer-moment';
class Example extends Component {
render() {
return <DateTimer dateTimeFormat="ddd, DD-MM-YY hh:mm:ss A" className="testClass" timeZone="America/Vancouver" />;
}
}
Properties
Property | Type | Required | Default value | Description |
---|---|---|---|---|
dateTimeFormat | string | yes | Format of time zone to display | |
className | string | no | Additional style classes | |
timeZone | string | no | System time zone | Show time according to zone e.g. America/New_York |
how to use TimeDuration
import React from "react";
import { TimeDuration } from 'react-date-timer-moment';
class Example extends Component {
render() {
return <TimeDuration className="className" id="idName" />;
}
}
Properties
Property | Type | Required | Default value | Description |
---|---|---|---|---|
id | string | no | time-duration-id | id of element if want to change |
className | string | no | Additional style classes |
Contribute
Feel free to send PR and any suggestions. Thanks