react-ui-basics 0.0.206 → 0.0.208

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-ui-basics",
3
- "version": "0.0.206",
3
+ "version": "0.0.208",
4
4
  "description": "",
5
5
  "module": "index.js",
6
6
  "_main": "index.cjs.js",
@@ -3,7 +3,7 @@ import ReactDOM from "react-dom";
3
3
  import './DatePicker.css'
4
4
  import TextField from "./TextField";
5
5
  import * as DateTools from "./DateTools";
6
- import {orNoop, classNames, preventDefault, ref, WINDOW} from "./Tools";
6
+ import {orNoop, classNames, preventDefault, ref, WINDOW, stopPropagation} from "./Tools";
7
7
  import Button from './Button'
8
8
  import CalendarMonthView from "./CalendarMonthView";
9
9
  import MaterialIcon from "./MaterialIcon";
@@ -22,6 +22,7 @@ const DayRenderer = ({day, selected, minDate, onClick}: {
22
22
  )}
23
23
  onClick={e => {
24
24
  preventDefault(e);
25
+ stopPropagation(e)
25
26
  if (minDate && (day.isBefore(minDate) && !day.isSameDate(minDate))) return;
26
27
 
27
28
  onClick(day);
@@ -183,12 +184,14 @@ class DatePicker extends React.Component<DatePickerProps, DatePickerState> {
183
184
  {monthToString(selectedMonth.get(DateTools.TimeUnit.MONTH))}
184
185
  &nbsp;{selectedMonth.get(DateTools.TimeUnit.YEAR)}
185
186
  </span>
186
- <Button flat={true} round={true} disabled={minDate && DateTools.dateOf(selectedMonth).isBefore(minDate)} onClick={() => {
187
+ <Button flat={true} round={true} disabled={minDate && DateTools.dateOf(selectedMonth).isBefore(minDate)} onClick={(e) => {
188
+ stopPropagation(e)
187
189
  this.setState({selectedMonth: DateTools.dateOf(selectedMonth).subtract(1, DateTools.TimeUnit.MONTH)})
188
190
  }}>
189
191
  <MaterialIcon icon={'chevron_left'}/>
190
192
  </Button>
191
- <Button flat={true} round={true} onClick={() => {
193
+ <Button flat={true} round={true} onClick={(e) => {
194
+ stopPropagation(e)
192
195
  this.setState({selectedMonth: DateTools.dateOf(selectedMonth).add(1, DateTools.TimeUnit.MONTH)})
193
196
  }}>
194
197
  <MaterialIcon icon={'chevron_right'}/>