@fluxhub/fluxhub-lib 1.0.307 → 1.0.310

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.
@@ -6581,7 +6581,7 @@
6581
6581
  /** @type {?} */
6582
6582
  var MOMENT_DATE_FORMATS = {
6583
6583
  parse: {
6584
- dateInput: 'D/MM/YYYY'
6584
+ dateInput: 'DD/MM/YYYY'
6585
6585
  },
6586
6586
  display: {
6587
6587
  dateInput: 'DD/MM/YYYY',
@@ -6771,6 +6771,17 @@
6771
6771
  * @return {?}
6772
6772
  */
6773
6773
  function (value, parseFormat) {
6774
+ if (value != null) {
6775
+ /** @type {?} */
6776
+ var arr = value.split('/');
6777
+ if (arr.length == 3) {
6778
+ if (arr[1].length == 1)
6779
+ arr[1] = "0" + arr[1];
6780
+ if (arr[0].length == 1)
6781
+ arr[0] = "0" + arr[0];
6782
+ value = arr[0] + "/" + arr[1] + "/" + arr[2];
6783
+ }
6784
+ }
6774
6785
  /** @type {?} */
6775
6786
  var m = moment(value, parseFormat, true);
6776
6787
  if (!m.isValid()) {
@@ -6992,10 +7003,16 @@
6992
7003
  /** @type {?} */
6993
7004
  var arr = s.split('/');
6994
7005
  if (arr.length == 3) {
7006
+ if (arr[1].length == 1)
7007
+ arr[1] = "0" + arr[1];
7008
+ if (arr[0].length == 1)
7009
+ arr[0] = "0" + arr[0];
6995
7010
  if (parseInt(arr[2]) < 3000 && parseInt(arr[0]) > 0 && parseInt(arr[0]) <= 31 && parseInt(arr[1]) > 0 && parseInt(arr[1]) <= 12) {
7011
+ console.log('arr ', arr);
6996
7012
  /** @type {?} */
6997
7013
  var dtp = new MomentDateAdapter();
6998
7014
  this.date_sel = dtp.createDate(parseInt(arr[2]), parseInt(arr[1]) - 1, parseInt(arr[0]));
7015
+ console.log('dare s', this.date_sel);
6999
7016
  }
7000
7017
  else
7001
7018
  console.log('data non valida! ', arr);