Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@
"dd": false
},
{
"version": "2.0.0",
"version": "3.0.0",
"name": "Calendar",
"type": "component",
"cName": "日历",
Expand All @@ -508,7 +508,7 @@
"show": true,
"taro": true,
"author": "szg2008",
"dd": false
"dd": true
},
{
"version": "2.0.0",
Expand Down
56 changes: 25 additions & 31 deletions src/packages/calendar/calendar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
display: flex;
flex-direction: column;
text-align: center;

&-buttons {
height: $calendar-header-height;
}
}

&-title {
Expand All @@ -51,10 +55,6 @@
font-size: $calendar-sub-title-font-size;
}

&-header-buttons {
height: $calendar-header-height;
}

&-weeks {
display: flex;
align-items: center;
Expand Down Expand Up @@ -103,12 +103,12 @@
display: flex;
flex-direction: column;
text-align: center;
}

&-month-title {
height: 23px;
line-height: 23px;
margin: 8px 0;
&-title {
height: 23px;
line-height: 23px;
margin: 8px 0;
}
}

&-days {
Expand All @@ -132,6 +132,7 @@
color: $color-primary;
}

&-info,
&-info-curr {
position: absolute;
bottom: 5px;
Expand All @@ -140,14 +141,6 @@
line-height: 14px;
}

&-info {
position: absolute;
bottom: 5px;
width: 100%;
font-size: 12px;
line-height: 14px;
}

&-info-top {
position: absolute;
width: 100%;
Expand Down Expand Up @@ -190,18 +183,18 @@
}
}

&-choose-disabled {
background-color: $calendar-choose-disable-background-color;
color: $calendar-disable-color !important;

.nut-calendar-day-info-curr {
display: none;
}
}

&-choose {
background-color: $calendar-choose-background-color;
color: $calendar-choose-color;

&-disabled {
background-color: $calendar-choose-disable-background-color;
color: $calendar-disable-color !important;

.nut-calendar-day-info-curr {
display: none;
}
}
}
}

Expand All @@ -213,13 +206,14 @@
background-color: $white;

.calendar-confirm-btn {
height: 44px;
margin: 10px 18px;
border-radius: 22px;
height: 40px;
line-height: 40px;
margin: 6px 16px;
text-align: center;
border-radius: $radius-base;
background: $button-primary-background-color;
color: $color-primary-text;
text-align: center;
line-height: 44px;
font-weight: $font-weight-bold;
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/packages/calendar/demos/taro/demo1.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { useState } from 'react'
import { Cell, Calendar } from '@nutui/nutui-react-taro'
import { Star } from '@nutui/icons-react-taro'

const Demo1 = () => {
const d = new Date()
Expand Down Expand Up @@ -35,12 +34,10 @@ const Demo1 = () => {
/>
<Calendar
visible={isVisible}
showTitle={false}
defaultValue={date}
onClose={closeSwitch}
onConfirm={setChooseValue}
onDayClick={select}
closeIcon={<Star />}
/>
</>
)
Expand Down
2 changes: 1 addition & 1 deletion src/packages/calendaritem/calendaritem.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ export const CalendarItem = React.forwardRef<
return (
<View className="nut-calendar-footer">
{children}
<View className="calendar-confirm-btn" onClick={confirm}>
<View onClick={confirm}>
{renderBottomButton ? (
renderBottomButton()
) : (
Expand Down