diff --git a/src/scales/scale.time.js b/src/scales/scale.time.js index c528a389047..18da79aa459 100644 --- a/src/scales/scale.time.js +++ b/src/scales/scale.time.js @@ -48,8 +48,7 @@ function parse(scale, input) { } const adapter = scale._adapter; - const options = scale.options.time; - const {parser, round, isoWeekday} = options; + const {parser, round, isoWeekday} = scale._parseOpts; let value = input; if (typeof parser === 'function') { @@ -217,6 +216,7 @@ export default class TimeScale extends Scale { this._majorUnit = undefined; this._offsets = {}; this._normalized = false; + this._parseOpts = undefined; } init(scaleOpts, opts) { @@ -229,6 +229,12 @@ export default class TimeScale extends Scale { // missing formats on update mergeIf(time.displayFormats, adapter.formats()); + this._parseOpts = { + parser: time.parser, + round: time.round, + isoWeekday: time.isoWeekday + }; + super.init(scaleOpts); this._normalized = opts.normalized;