feat: Improve date picker, add select item loop logic
This commit is contained in:
@@ -13,11 +13,15 @@ DateSlidePickerBox::DateSlidePickerBox(QWidget *parent)
|
||||
initBox(mHundredYearBox, {"19", "20"}, 56);
|
||||
|
||||
QStringList tenYearValues{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"};
|
||||
mTenYearBox->setLoop(true);
|
||||
mYearBox->setLoop(true);
|
||||
|
||||
initBox(mTenYearBox, tenYearValues);
|
||||
initBox(mYearBox, tenYearValues);
|
||||
|
||||
addSplitLabel();
|
||||
|
||||
mMonthBox->setLoop(true);
|
||||
QStringList monthValues{"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"};
|
||||
initBox(mMonthBox, monthValues, 56);
|
||||
|
||||
@@ -27,6 +31,7 @@ DateSlidePickerBox::DateSlidePickerBox(QWidget *parent)
|
||||
for (int i = 13; i <= 31; i++) {
|
||||
days << QString("%1").arg(i, 2);
|
||||
}
|
||||
mDayBox->setLoop(true);
|
||||
initBox(mDayBox, days, 56);
|
||||
|
||||
mBigMonthList.append({"01", "03", "05", "07", "08", "10", "12"});
|
||||
|
||||
Reference in New Issue
Block a user