Q: TypeError: Object(...) is not a function when add Moment to Bootstrap Date Time Picker To be straightforward, here's the code of my picker:
import {moment} from 'moment';

const datePicker = () => {
  $('.datetimepicker').datetimepicker({
    format: 'LT',
    locale: 'PT-BR',
    icons: {
      up: "fa fa-chevron-up",
      down: "fa fa-chevron-down",
    },
    stepping: 15,
    disabledTimeIntervals: [[moment({ h: 0 }), moment({ h: 8 })], [moment({ h: 18 }), moment({ h: 24 })]]
  });
};

export {datePicker};

The line disabledTimeIntervals: [[moment({ h: 0 }), moment({ h: 8 })], [moment({ h: 18 }), moment({ h: 24 })]] is coming direct from the documentation.
But adding it causes dtPicker.js:24 Uncaught TypeError: Object(...) is not a function

A: you are importing moment the wrong way
import moment from "moment"; // correct way

this answer is after 10 months but may help others
