react-ui-basics 0.0.206 → 0.0.207
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/DatePicker.js +5 -3
- package/DatePicker.js.map +1 -1
- package/bundle.css +1035 -1035
- package/package.json +1 -1
- package/src/DatePicker.tsx +5 -3
package/package.json
CHANGED
package/src/DatePicker.tsx
CHANGED
|
@@ -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";
|
|
@@ -183,12 +183,14 @@ class DatePicker extends React.Component<DatePickerProps, DatePickerState> {
|
|
|
183
183
|
{monthToString(selectedMonth.get(DateTools.TimeUnit.MONTH))}
|
|
184
184
|
{selectedMonth.get(DateTools.TimeUnit.YEAR)}
|
|
185
185
|
</span>
|
|
186
|
-
<Button flat={true} round={true} disabled={minDate && DateTools.dateOf(selectedMonth).isBefore(minDate)} onClick={() => {
|
|
186
|
+
<Button flat={true} round={true} disabled={minDate && DateTools.dateOf(selectedMonth).isBefore(minDate)} onClick={(e) => {
|
|
187
|
+
stopPropagation(e)
|
|
187
188
|
this.setState({selectedMonth: DateTools.dateOf(selectedMonth).subtract(1, DateTools.TimeUnit.MONTH)})
|
|
188
189
|
}}>
|
|
189
190
|
<MaterialIcon icon={'chevron_left'}/>
|
|
190
191
|
</Button>
|
|
191
|
-
<Button flat={true} round={true} onClick={() => {
|
|
192
|
+
<Button flat={true} round={true} onClick={(e) => {
|
|
193
|
+
stopPropagation(e)
|
|
192
194
|
this.setState({selectedMonth: DateTools.dateOf(selectedMonth).add(1, DateTools.TimeUnit.MONTH)})
|
|
193
195
|
}}>
|
|
194
196
|
<MaterialIcon icon={'chevron_right'}/>
|