This repository was archived by the owner on Dec 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
Wrong date value submitted #114
Copy link
Copy link
Open
Description
Here is how the date-picker is defined in a component:
# templates/components/holiday-hour.hbs
..
{{bootstrap-datepicker value=holiday.date class='form-control' autoclose=true language=currentLanguage format="dd/mm/yyyy"}}
Here is component itself with currentLanguage CP set up:
# components/holiday-hour.js
import Component from '@ember/component';
import { inject as service } from '@ember/service';
import { computed } from '@ember/object';
export default Component.extend({
i18n: service('i18n'),
constants: service(),
holiday: null,
state: null,
states: [],
tagName: '',
currentLanguage: '',
init() {
this._super(...arguments);
this.states = this.get('constants.states');
this.currentLanguage = this.get('i18n').get('locale');
},
....
When I select the 30th of April 2018 (30/04/2018), the sent value is wrong:
2018-04-29T22:00:00.000Z
Ember version:
ember-cli: 3.1.2
node: 8.9.1
os: darwin x64
jQuery: 3.3.1
Metadata
Metadata
Assignees
Labels
No labels
