moment-jdateformatparser icon indicating copy to clipboard operation
moment-jdateformatparser copied to clipboard

momentjs.fn is not defined.

Open huyit88 opened this issue 4 years ago • 1 comments

Hi Team, I use the latest package in angular 6. npm install moment-jdateformatparser. But i got error with momentjs.fn is not defined when testing with simple format: moment().formatWithJDF('DD'); I am not sure if the import is wrong: import * as moment from 'moment-jdateformatparser'; I am at your disposal.

huyit88 avatar May 20 '20 10:05 huyit88

Try this:

import * as moment from 'moment-timezone';
import * as momentParser from 'moment-jdateformatparser';
momentParser(moment);

See https://github.com/icambron/twix.js/issues/102

johnmanko avatar Jun 03 '20 15:06 johnmanko