@symbo.ls/datepicker 2.11.97 → 2.11.126

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.
Files changed (3) hide show
  1. package/grid.js +4 -5
  2. package/index.js +0 -7
  3. package/package.json +2 -2
package/grid.js CHANGED
@@ -32,7 +32,7 @@ export const DatePickerGrid = {
32
32
  },
33
33
 
34
34
  childExtend: DatePickerDay,
35
- $setStateCollection: (el, s) => s.days
35
+ $setStateCollection: ({ state }) => state.days
36
36
  }
37
37
 
38
38
  export const DatePickerGridContainer = {
@@ -68,9 +68,8 @@ export const DatePickerGridContainer = {
68
68
  }
69
69
  },
70
70
 
71
- state: (el, s) => {
72
- const state = el.parent.state
73
- console.warn(state)
71
+ state: ({ parent }) => {
72
+ const state = parent.state
74
73
  if (!state.activeYear) return
75
74
  return (new Array(12)).fill(undefined).map((v, k) => {
76
75
  const year = state.activeYear
@@ -105,6 +104,6 @@ export const DatePickerGridContainer = {
105
104
  }
106
105
  }
107
106
  },
108
- $setStateCollection: (el, s) => s.parse()
107
+ $setStateCollection: ({ state }) => state.parse()
109
108
  }
110
109
  }
package/index.js CHANGED
@@ -17,13 +17,6 @@ export const DatePicker = {
17
17
  const activeYear = date.getFullYear()
18
18
  const activeMonth = date.getMonth()
19
19
  const activeDay = date.getDate()
20
- console.log({
21
- yearRange: props.yearRange || [activeYear - 30, activeYear],
22
- activeYear: props.activeYear || activeYear,
23
- activeMonth: props.activeMonth || activeMonth,
24
- activeDay: props.activeDay || activeDay,
25
- selectedDay: props.selectedDay || null
26
- })
27
20
  return {
28
21
  yearRange: props.yearRange || [activeYear - 30, activeYear],
29
22
  activeYear: props.activeYear || activeYear,
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@symbo.ls/datepicker",
3
- "version": "2.11.97",
3
+ "version": "2.11.126",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "d5b73e4c431d30798a999c5077b446472f0a6ac4",
6
+ "gitHead": "463c4925df4dfbed4611feafe34c6f011d3ba287",
7
7
  "dependencies": {
8
8
  "@symbo.ls/atoms": "latest",
9
9
  "@symbo.ls/button": "latest",