diff --git a/airtime_mvc/public/js/airtime/schedule/add-show.js b/airtime_mvc/public/js/airtime/schedule/add-show.js index 08e09305a..7ff725335 100644 --- a/airtime_mvc/public/js/airtime/schedule/add-show.js +++ b/airtime_mvc/public/js/airtime/schedule/add-show.js @@ -444,12 +444,7 @@ function showErrorSections() { } $(document).ready(function() { - $.mask.masks = $.extend($.mask.masks,{ - date:{ mask: '9999-19-39', selectCharsOnFocus: true, autoTab: false}, - time:{ mask: '29:69', selectCharsOnFocus: true, autoTab: false} - }) - - $('input:text').setMask() + setAddShowEvents(); }); //Alert the error and reload the page @@ -475,16 +470,4 @@ $(window).resize(function(){ $('#schedule_calendar').fullCalendar('option', 'contentHeight', mainHeight) $("#schedule_calendar").fullCalendar('render'); -}); - -$(window).load(function() { - $.mask.masks = $.extend($.mask.masks,{ - date:{ mask: '9999-19-39', selectCharsOnFocus: true, autoTab: false}, - time:{ mask: '29:69', selectCharsOnFocus: true, autoTab: false} - }) - - $('input:text').setMask() - - setAddShowEvents(); - -}); +}); \ No newline at end of file diff --git a/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js b/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js index a7640eb5e..1bd193bde 100644 --- a/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js +++ b/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js @@ -37,6 +37,13 @@ function openAddShowForm() { $add_show_name.select(); }); } + + $.mask.masks = $.extend($.mask.masks,{ + date:{ mask: '9999-19-39', selectCharsOnFocus: true, autoTab: false}, + time:{ mask: '29:69', selectCharsOnFocus: true, autoTab: false} + }) + + $('input:text').setMask() } function makeAddShowButton(){