aurelia-bootstrap-datetimepicker
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -322,2 +322,13 @@ define(['exports', 'aurelia-framework', 'moment', 'jquery', './picker-global-options', 'eonasdan-bootstrap-datetimepicker'], function (exports, _aureliaFramework, _moment, _jquery, _pickerGlobalOptions) { | ||
AbpDatetimePickerCustomElement.prototype.optionsChanged = function optionsChanged(newValue, oldValue) { | ||
if (newValue !== oldValue && newValue && this.domElm) { | ||
var newFormat = newValue.format; | ||
if (newFormat && this._format !== newFormat && (0, _moment2.default)(this.model, newFormat).isValid()) { | ||
this._format = newFormat; | ||
this.model = (0, _moment2.default)(this.model, this._format).toDate(); | ||
} | ||
this.domElm.data('DateTimePicker').options(newValue); | ||
} | ||
}; | ||
AbpDatetimePickerCustomElement.prototype.valueChanged = function valueChanged(newValue, oldValue) { | ||
@@ -324,0 +335,0 @@ if (newValue !== oldValue && newValue) { |
@@ -323,2 +323,13 @@ 'use strict'; | ||
AbpDatetimePickerCustomElement.prototype.optionsChanged = function optionsChanged(newValue, oldValue) { | ||
if (newValue !== oldValue && newValue && this.domElm) { | ||
var newFormat = newValue.format; | ||
if (newFormat && this._format !== newFormat && (0, _moment2.default)(this.model, newFormat).isValid()) { | ||
this._format = newFormat; | ||
this.model = (0, _moment2.default)(this.model, this._format).toDate(); | ||
} | ||
this.domElm.data('DateTimePicker').options(newValue); | ||
} | ||
}; | ||
AbpDatetimePickerCustomElement.prototype.valueChanged = function valueChanged(newValue, oldValue) { | ||
@@ -325,0 +336,0 @@ if (newValue !== oldValue && newValue) { |
@@ -291,2 +291,13 @@ var _dec, _dec2, _dec3, _dec4, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15; | ||
optionsChanged(newValue, oldValue) { | ||
if (newValue !== oldValue && newValue && this.domElm) { | ||
let newFormat = newValue.format; | ||
if (newFormat && this._format !== newFormat && moment(this.model, newFormat).isValid()) { | ||
this._format = newFormat; | ||
this.model = moment(this.model, this._format).toDate(); | ||
} | ||
this.domElm.data('DateTimePicker').options(newValue); | ||
} | ||
} | ||
valueChanged(newValue, oldValue) { | ||
@@ -293,0 +304,0 @@ if (newValue !== oldValue && newValue) { |
@@ -324,2 +324,13 @@ 'use strict'; | ||
AbpDatetimePickerCustomElement.prototype.optionsChanged = function optionsChanged(newValue, oldValue) { | ||
if (newValue !== oldValue && newValue && this.domElm) { | ||
var newFormat = newValue.format; | ||
if (newFormat && this._format !== newFormat && moment(this.model, newFormat).isValid()) { | ||
this._format = newFormat; | ||
this.model = moment(this.model, this._format).toDate(); | ||
} | ||
this.domElm.data('DateTimePicker').options(newValue); | ||
} | ||
}; | ||
AbpDatetimePickerCustomElement.prototype.valueChanged = function valueChanged(newValue, oldValue) { | ||
@@ -326,0 +337,0 @@ if (newValue !== oldValue && newValue) { |
{ | ||
"name": "aurelia-bootstrap-datetimepicker", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "An Aurelia Custom Element for the 3rd party addon [Eonasdan Bootstrap Datepicker]", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -72,3 +72,3 @@ # Aurelia-Bootstrap-Datetimepicker | ||
Some extra bindable attributes were added to the Custom Element to add extra flexibility. The way to call them is through an attribute call in the View. The list of these extras is the following | ||
* iconBase: provide different set of icons (`font-awesome` or `glyphicon`), (default: `'glyphicon'`) | ||
* iconBase: provide different set of icons (`glyphicon`, `font-awesome` or `font-awesome-5`), (default: `'glyphicon'`) | ||
* withDateIcon: add a Bootstrap `input group` with a Calendar icon on the right of the input (default: `true`) | ||
@@ -75,0 +75,0 @@ |
@@ -317,2 +317,13 @@ import {inject, bindable, bindingMode, DOM} from 'aurelia-framework'; | ||
optionsChanged(newValue, oldValue) { | ||
if (newValue !== oldValue && newValue && this.domElm) { | ||
let newFormat = newValue.format; | ||
if (newFormat && this._format !== newFormat && moment(this.model, newFormat).isValid()) { | ||
this._format = newFormat; | ||
this.model = moment(this.model, this._format).toDate(); | ||
} | ||
this.domElm.data('DateTimePicker').options(newValue); | ||
} | ||
} | ||
valueChanged(newValue, oldValue) { | ||
@@ -319,0 +330,0 @@ if (newValue !== oldValue && newValue) { |
664147
56
2386