@innoways/drip-form-theme-antd 9.0.11 → 9.0.12

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.0.12
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: added can not select previous date option in datepicker style config 9.0.12
8
+ - Updated dependencies
9
+ - @innoways/hooks@9.0.12
10
+ - @innoways/utils@9.0.12
11
+
3
12
  ## 9.0.11
4
13
 
5
14
  ### Patch Changes
package/dist/index.js CHANGED
@@ -22351,6 +22351,14 @@ var config$8 = {
22351
22351
  ui: {
22352
22352
  type: 'switch'
22353
22353
  }
22354
+ }, {
22355
+ fieldKey: 'can_not_select_previous_date',
22356
+ type: 'boolean',
22357
+ title: 'Can not select previous date',
22358
+ "default": false,
22359
+ ui: {
22360
+ type: 'switch'
22361
+ }
22354
22362
  }, {
22355
22363
  fieldKey: 'disabled',
22356
22364
  type: 'boolean',
@@ -22494,7 +22502,7 @@ var config$8 = {
22494
22502
  }
22495
22503
  };
22496
22504
 
22497
- var _excluded$9 = ["disabled", "onChange", "fieldData", "fieldKey", "dispatch", "style", "range", "format", "flatpickrFormat", "picker", "asyncValidate", "showTime", "allowClear", "getKey", "formMode", "showCurrentDate", "themeColor", "options"];
22505
+ var _excluded$9 = ["disabled", "onChange", "fieldData", "fieldKey", "dispatch", "style", "range", "can_not_select_previous_date", "format", "flatpickrFormat", "picker", "asyncValidate", "showTime", "allowClear", "getKey", "formMode", "showCurrentDate", "themeColor", "options"];
22498
22506
 
22499
22507
  function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
22500
22508
 
@@ -22509,6 +22517,8 @@ var DatePickerField = function DatePickerField(_ref) {
22509
22517
  dispatch = _ref.dispatch,
22510
22518
  style = _ref.style,
22511
22519
  range = _ref.range,
22520
+ _ref$can_not_select_p = _ref.can_not_select_previous_date,
22521
+ can_not_select_previous_date = _ref$can_not_select_p === void 0 ? false : _ref$can_not_select_p,
22512
22522
  _ref$format = _ref.format,
22513
22523
  format = _ref$format === void 0 ? 'DD-MMM-YYYY' : _ref$format,
22514
22524
  _ref$flatpickrFormat = _ref.flatpickrFormat,
@@ -22600,14 +22610,16 @@ var DatePickerField = function DatePickerField(_ref) {
22600
22610
  themeColor: themeColor,
22601
22611
  style: style,
22602
22612
  allowClear: allowClear,
22603
- options: _objectSpread$4({
22613
+ options: _objectSpread$4(_objectSpread$4({
22604
22614
  enableTime: showTime,
22605
22615
  altInput: true,
22606
22616
  allowInput: false,
22607
22617
  altFormat: showTime ? flatpickrFormat + ' H:i' : flatpickrFormat,
22608
22618
  dateFormat: showTime ? 'Y-m-d H:i' : 'Y-m-d',
22609
22619
  altInputClass: disabled ? 'drip_date_picker_input_disabled' : 'drip_date_picker_input'
22610
- }, options)
22620
+ }, can_not_select_previous_date && fieldData ? {
22621
+ minDate: moment(fieldData, format).toDate()
22622
+ } : {}), options)
22611
22623
  })));
22612
22624
  };
22613
22625
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innoways/drip-form-theme-antd",
3
- "version": "9.0.11",
3
+ "version": "9.0.12",
4
4
  "author": "JDFED",
5
5
  "description": "drip-form antd主题包",
6
6
  "main": "dist/index.js",
@@ -31,8 +31,8 @@
31
31
  "dependencies": {
32
32
  "@ant-design/icons": "^4.7.0",
33
33
  "@babel/runtime": "^7.10.2",
34
- "@innoways/hooks": "^9.0.11",
35
- "@innoways/utils": "^9.0.11",
34
+ "@innoways/hooks": "^9.0.12",
35
+ "@innoways/utils": "^9.0.12",
36
36
  "antd": "^4.16.13",
37
37
  "flatpickr": "4.6.3",
38
38
  "moment": "^2.26.0",