@tuya-miniapp/smart-ui 2.6.2-beta-3 → 2.6.2-beta-4
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.
@@ -21,7 +21,7 @@ function getDayStyle(type, index, date, rowHeight, color, firstDayOfWeek) {
|
|
21
21
|
style.push(['margin-left', (100 * offset) / 7 + '%']);
|
22
22
|
}
|
23
23
|
|
24
|
-
if (rowHeight !== ROW_HEIGHT) {
|
24
|
+
if (rowHeight && rowHeight !== ROW_HEIGHT) {
|
25
25
|
style.push(['height', rowHeight + 'px']);
|
26
26
|
}
|
27
27
|
|
@@ -49,7 +49,7 @@ function getDayStyle(type, index, date, rowHeight, color, firstDayOfWeek) {
|
|
49
49
|
function formatMonthTitle(date, formatter = 'YYYY-MM') {
|
50
50
|
date = getDate(date);
|
51
51
|
var year = date.getFullYear();
|
52
|
-
var month = date.getMonth() + 1 < 10 ?
|
52
|
+
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 + '';
|
53
53
|
return formatter.replace('YYYY', year + '').replace('MM', month);
|
54
54
|
}
|
55
55
|
|
@@ -57,10 +57,7 @@ function getMonthStyle(visible, date, rowHeight) {
|
|
57
57
|
if (!visible) {
|
58
58
|
date = getDate(date);
|
59
59
|
|
60
|
-
var totalDay = utils.getMonthEndDay(
|
61
|
-
date.getFullYear(),
|
62
|
-
date.getMonth() + 1
|
63
|
-
);
|
60
|
+
var totalDay = utils.getMonthEndDay(date.getFullYear(), date.getMonth() + 1);
|
64
61
|
var offset = getDate(date).getDay();
|
65
62
|
var padding = Math.ceil((totalDay + offset) / 7) * rowHeight;
|
66
63
|
|
@@ -21,7 +21,7 @@ function getDayStyle(type, index, date, rowHeight, color, firstDayOfWeek) {
|
|
21
21
|
style.push(['margin-left', (100 * offset) / 7 + '%']);
|
22
22
|
}
|
23
23
|
|
24
|
-
if (rowHeight !== ROW_HEIGHT) {
|
24
|
+
if (rowHeight && rowHeight !== ROW_HEIGHT) {
|
25
25
|
style.push(['height', rowHeight + 'px']);
|
26
26
|
}
|
27
27
|
|
@@ -49,7 +49,7 @@ function getDayStyle(type, index, date, rowHeight, color, firstDayOfWeek) {
|
|
49
49
|
function formatMonthTitle(date, formatter = 'YYYY-MM') {
|
50
50
|
date = getDate(date);
|
51
51
|
var year = date.getFullYear();
|
52
|
-
var month = date.getMonth() + 1 < 10 ?
|
52
|
+
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 + '';
|
53
53
|
return formatter.replace('YYYY', year + '').replace('MM', month);
|
54
54
|
}
|
55
55
|
|
@@ -57,10 +57,7 @@ function getMonthStyle(visible, date, rowHeight) {
|
|
57
57
|
if (!visible) {
|
58
58
|
date = getDate(date);
|
59
59
|
|
60
|
-
var totalDay = utils.getMonthEndDay(
|
61
|
-
date.getFullYear(),
|
62
|
-
date.getMonth() + 1
|
63
|
-
);
|
60
|
+
var totalDay = utils.getMonthEndDay(date.getFullYear(), date.getMonth() + 1);
|
64
61
|
var offset = getDate(date).getDay();
|
65
62
|
var padding = Math.ceil((totalDay + offset) / 7) * rowHeight;
|
66
63
|
|