Wolfsblvt / advancedpolls

Advances the core poll system of phpBB with new features like hiding votes till end, showing poll voters, limiting the votes and more.
GNU General Public License v2.0
11 stars 13 forks source link

Error when setting an specific date/time for poll end #113

Open javiexin opened 7 years ago

javiexin commented 7 years ago

Poll start cannot be negative -86400

redkir commented 5 years ago

I found your fix at phpbb.com forum and decide to paste it for another visitors:

1) ext\wolfsblvt\advancedpolls\core\advancedpolls.php

Find '%d-%d-%d-%d-%d' Replace in-line with '%d-%d-%d-%02d-%02d'

2) ext/wolfsblvt/advancedpolls/styles/prosilver/template/js/poll_length_posting.js

Find line starting with: document.getElementById('wolfsblvt_poll_end_label').innerHTML = apPollEnd.getFullYear()

Replace full line with: document.getElementById('wolfsblvt_poll_end_label').innerHTML = apPollEnd.getFullYear() + "/" + (apPollEnd.getMonth() + 1) + "/" + apPollEnd.getDate() + " " + ("0" + apPollEnd.getHours()).slice(-2) + ":" + ("0" + apPollEnd.getMinutes()).slice(-2);