What do you want to save?
Add Code snippet
New code examples
-
-
Javascript 2022-02-03 07:16:33
moment js convert to local timezone
// MOMENT.JS IS NO LONGER MAINTAINED - SWITCH TO DAY.JS, LUXON, ETC. const time = moment.tz("2021-04-14T02:08:10.370Z") const localtz = moment.tz.guess() const date = time.clone().tz(localtz) const formatDate = moment(date).format('MMMM Do YYYY... Add solution -
-
Javascript 2021-09-27 19:59:06
how to store multiple date from date form field in reactjs
handleChange = (e, date) => { const value = moment(date); const chargeId = e.target.name; console.log(chargeId); this.setState({[chargeId]: value}, () => console.log(this.state[chargeId])); } Add solution