Default episode publish time to browser local time
Build and Deploy / build-and-deploy (push) Successful in 43s
Build and Deploy / build-and-deploy (push) Successful in 43s
This commit is contained in:
@@ -72,5 +72,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
(function() {
|
||||||
|
const input = document.getElementById('published_at');
|
||||||
|
if (!input.value) {
|
||||||
|
const now = new Date();
|
||||||
|
const pad = (n) => String(n).padStart(2, '0');
|
||||||
|
input.value = now.getFullYear() + '-' +
|
||||||
|
pad(now.getMonth() + 1) + '-' +
|
||||||
|
pad(now.getDate()) + 'T' +
|
||||||
|
pad(now.getHours()) + ':' +
|
||||||
|
pad(now.getMinutes());
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user