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>
|
||||
</form>
|
||||
</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>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user