-1

I want to remove "00" from time in react-big-calendar but not able to find the way.enter image description here

0

1 Answer 1

1

If you had looked into Localization and Date Formatting in the Readme / Manual, you could have easily done it using the following. TBH, it's right there in the Getting Started - you need to use dateFormat:

import BigCalendar from 'react-big-calendar'
import moment from 'moment'

// Setup the localizer by providing the moment (or globalize) Object
// to the correct localizer.
const localizer = BigCalendar.momentLocalizer(moment) // or globalizeLocalizer

const MyCalendar = props => (
  <div>
    <BigCalendar
      localizer={localizer}
      events={myEventsList}
      startAccessor="start"
      endAccessor="end"
      dateFormat="h t"
    />
  </div>
)

Preview

demo

Related: How to set momentLocalizer (moment.js) for react-big-calendar (fullcalendar.js)?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.