Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardxiao committed Feb 15, 2022
1 parent 2c8cac7 commit 5cbfbe1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 2.0.2

- Support Korean

# 2.0.0

- Support TS
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { CalendarPicker, RangePicker } from 'react-minimal-datetime-range';
import 'react-minimal-datetime-range/lib/react-minimal-datetime-range.min.css';

<CalendarPicker
locale={`en-us`} // 'en-us' or 'zh-cn'; default is en-us
locale={`en-us`} // ['en-us', 'zh-cn','ko-kr']; default is en-us
show={showCalendarPicker} //default is false
allowPageClickToClose={true} // default is true
onClose={() => setShowCalendarPicker(false)}
Expand Down
2 changes: 1 addition & 1 deletion example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const Component = () => {
{!showCalendarPicker ? <span>Show CalendarPicker</span> : <span>Close CalendarPicker</span>}
</div>
<CalendarPicker
locale={`en-us`} // 'en-us' or 'zh-cn'; default is en-us
locale={`en-us`} // ['en-us', 'zh-cn','ko-kr']; default is en-us
show={showCalendarPicker} //default is false
onClose={() => setShowCalendarPicker(false)}
allowPageClickToClose={true} // default is true
Expand Down
6 changes: 2 additions & 4 deletions src/js/component/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,7 @@ const Index: React.FC<IndexProps> = memo(
<TransitionGroup className="react-minimal-datetime-range-calendar__title-container" childFactory={child => React.cloneElement(child, { classNames })}>
<CSSTransition key={pickedYearMonth.string} timeout={{ enter: 300, exit: 300 }} className={`react-minimal-datetime-range-calendar__title`} style={{ left: '0' }} classNames={classNames}>
<span className={`react-minimal-datetime-range-calendar__clicker`} onClick={handleShowSelectorPanel} onMouseDown={onMouseDown} onMouseUp={onMouseUp}>
<span className={`react-minimal-datetime-range-calendar__clicker`}>
{ LOCALE_DATA.date_format(LOCALE_DATA.months[Number(pickedYearMonth.month) - 1], pickedYearMonth.year)}
</span>
<span className={`react-minimal-datetime-range-calendar__clicker`}>{LOCALE_DATA.date_format(LOCALE_DATA.months[Number(pickedYearMonth.month) - 1], pickedYearMonth.year)}</span>
</span>
</CSSTransition>
</TransitionGroup>
Expand Down Expand Up @@ -416,7 +414,7 @@ const CalendarBody: React.FC<CalendarBodyProps> = memo(({ data = {}, pickedDateI
const content = Object.keys(data).map(key => {
let colHtml;
if (data[key].length) {
colHtml = data[key].map((item: {[k: string]: any}, key: any) => {
colHtml = data[key].map((item: { [k: string]: any }, key: any) => {
const isPicked = pickedDateInfo.date === item.name && pickedDateInfo.month === item.month && pickedDateInfo.year === item.year;
let isDisabled = pickedYearMonth.month !== item.month;
const datePickerItemClass = cx(
Expand Down

0 comments on commit 5cbfbe1

Please sign in to comment.