MediaWiki:DYK-nomination-wizard.js: Difference between revisions

Content deleted Content added
update
update date check behaviour per feedback at WT:DYK
Line 140:
label: 'on date: ',
name: 'date',
tooltip: 'The date as ofon which creation/expansion has been completedbegan. Must be within the past week. ',
value: new Date().toISOString().slice(0, 10), // YYYY-MM-DD format
event: dyk.dateCheck // for the benefit of browsers that don't support a datepicker for date fields
Line 457:
}
var diffdays = diff/(1000*60*60*24);
if (diffdays >= 1012) {
$(checkElem).html(Morebits.createHtml('Date must be within the past week, see [[WP:DYK#New]]'));
checkElem.style.color = '#fa3800e8red';
} else if (diffdays >= 8) {
checkElem.textContent = 'Possibly ineligible as date is not within the past week';
Line 620:
}
var diffdays = diff/(1000*60*60*24);
if (diffdays >= 1012) {
alert('The date specified is well outside the past week, and hence the article is ineligible for DYK, see WP:DYK#New');
return;
}
if (diffdays >= 8 && !confirm('The date specified is not within the past week, see WP:DYK#New. Are you sure you want to continue?')) {
return;
}