This commit is contained in:
@ -333,9 +333,14 @@ function renderQuestionBody(q, sectionIdx) {
|
||||
|
||||
case 'date_spinner': {
|
||||
const precision = config.precision || 'full';
|
||||
const dateRange = config.dateRange === 'future' ? 'future' : 'past';
|
||||
const years = [];
|
||||
const now = new Date().getFullYear();
|
||||
for (let yr = now + 1; yr >= 1900; yr--) years.push(yr);
|
||||
if (dateRange === 'future') {
|
||||
for (let yr = now; yr <= now + 50; yr++) years.push(yr);
|
||||
} else {
|
||||
for (let yr = now; yr >= 1900; yr--) years.push(yr);
|
||||
}
|
||||
inner += `<div class="qp-date-row">`;
|
||||
if (precision === 'full') {
|
||||
inner += `<select data-part="day" class="qp-select qp-select-sm"><option value="">Day</option>`;
|
||||
|
||||
Reference in New Issue
Block a user