@simpleangularcontrols/sac-common 10.0.0-rc.6 → 10.0.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/simpleangularcontrols-sac-common.umd.js +9 -1
- package/bundles/simpleangularcontrols-sac-common.umd.js.map +1 -1
- package/bundles/simpleangularcontrols-sac-common.umd.min.js +1 -1
- package/bundles/simpleangularcontrols-sac-common.umd.min.js.map +1 -1
- package/common/basedatetimecontrol.d.ts +1 -1
- package/esm2015/common/basedatetimecontrol.js +1 -1
- package/esm2015/validation/isDateValid.js +9 -1
- package/fesm2015/simpleangularcontrols-sac-common.js +10 -2
- package/fesm2015/simpleangularcontrols-sac-common.js.map +1 -1
- package/package.json +1 -1
- package/simpleangularcontrols-sac-common-10.0.0-rc.7.tgz +0 -0
- package/simpleangularcontrols-sac-common-10.0.0-rc.6.tgz +0 -0
|
@@ -3159,19 +3159,27 @@
|
|
|
3159
3159
|
};
|
|
3160
3160
|
}
|
|
3161
3161
|
|
|
3162
|
+
// #region Variables
|
|
3162
3163
|
/**
|
|
3163
3164
|
* Moment
|
|
3164
3165
|
*/
|
|
3165
3166
|
var moment = moment___default['default'];
|
|
3167
|
+
// #endregion Variables
|
|
3168
|
+
// #region Functions
|
|
3166
3169
|
function isDateValid(value, format) {
|
|
3167
3170
|
// NULL ist gültig
|
|
3168
3171
|
if (value === null || value === undefined || value === '') {
|
|
3169
3172
|
return true;
|
|
3170
3173
|
}
|
|
3174
|
+
// Check is Iso Date (From API Call)
|
|
3175
|
+
if (moment(value, moment_.ISO_8601, true).isValid()) {
|
|
3176
|
+
return true;
|
|
3177
|
+
}
|
|
3171
3178
|
var date = moment(value, [format], true);
|
|
3172
3179
|
date = date.utc();
|
|
3173
3180
|
return date.isValid();
|
|
3174
|
-
}
|
|
3181
|
+
}
|
|
3182
|
+
// #endregion Functions
|
|
3175
3183
|
|
|
3176
3184
|
function isValidDateValidator(validationMessage, validationMessageSummary) {
|
|
3177
3185
|
return function (control) {
|