This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// For date/time picker +1 day after certain time | |
// https://gist.github.com/carmoreira/3ebf05aa9e31f8ddba3af8e3408ceab6 (plugin author) | |
jQuery(document).ready(function(){ | |
// get current time with moment - it will have the tz | |
var date = moment().toDate(); | |
var closetime = moment('18:00','HH:mm').toDate(); | |
// if it's after X pm (24 hr format) then change classes and re-init date pickers | |
if(date >= closetime){ | |
jQuery('.datefield-ny').removeClass('datefield-ny').addClass('datefield-ny-plus-one'); |
OlderNewer