Skip to content

Commit

Permalink
fix(DatePicker): 修复 react-day-picker 的 esm build 问题,相关 issue gpbl/rea…
Browse files Browse the repository at this point in the history
  • Loading branch information
aragakey committed Jul 12, 2021
1 parent 231cf1d commit 300fe57
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion components/date-picker/DatePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable import/no-duplicates */
/* eslint-disable no-underscore-dangle */
import React, {
forwardRef,
useContext,
Expand All @@ -7,7 +9,8 @@ import React, {
} from "react"
import PropTypes from "prop-types"
import classNames from "classnames"
import DayPicker, {
import DPR from "day-picker-react"
import {
CaptionElementProps,
DateUtils,
NavbarElementProps,
Expand All @@ -33,6 +36,7 @@ import {
convertDateToString,
} from "./core"

const DayPicker = DPR.__esModule ? DPR.default : DPR
const prefix = "adui-date"
const noop = () => {}

Expand Down
7 changes: 5 additions & 2 deletions components/date-picker/RangePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable import/no-duplicates */
/* eslint-disable no-underscore-dangle */
/* eslint-disable max-len */
import React, {
forwardRef,
Expand All @@ -9,7 +11,8 @@ import React, {
} from "react"
import PropTypes from "prop-types"
import classNames from "classnames"
import DayPicker, {
import DPR from "day-picker-react"
import {
CaptionElementProps,
DateUtils,
NavbarElementProps,
Expand All @@ -36,8 +39,8 @@ import {
isDayInRange,
} from "./core"

const DayPicker = DPR.__esModule ? DPR.default : DPR
const prefix = "adui-date"

const noop = () => {}

export interface IRangePickerProps {
Expand Down

0 comments on commit 300fe57

Please sign in to comment.