{"version":3,"sources":["jquery.datepicker.min.js"],"names":["$","fn","datepicker","options","settings","extend","format","overrideMobile","minYear","maxYear","mySUSTADate","hideCSProductPYFlagMessage","width","onSelect","this","filter","each","index","normalizeDate","local","date","year","month","day","moment","daysInMonth","parseInt","drawHeader","calendar","mDec","detach","mInc","yDec","yInc","html","appendTo","removeClass","add","addClass","drawGrid","grid","empty","dates","i","push","currentYear","currentMonth","currentDay","firstDate","lastDate","length","unshift","newGrid","gridItem","gridLink","text","attr","toLowerCase","drawCalendar","writeDate","clickTrap","evt","preventDefault","nextMonth","prevMonth","nextYear","prevYear","focusEvent","trigger","all","blurEvent","find","active","hasClass","css","height","wrapper","target","get","Placeholders","disable","input","enable","val","currentDate","originalDate","hide","prop","show","enterDate","isValid","clickDate","replace","split","parent","maskerade","reset","resetValue","navigator","userAgent","match","on","temp","container","placeholder","days","insertBefore","removeAttr","undefined","insertAfter","mask","change","remove","jQuery"],"mappings":"CAQA,SAAYA,GACXA,EAAEC,GAAGC,WAAa,SAAUC,GAE3B,GAAIC,GAAWJ,EAAEK,QAChBC,OAAiB,aACjBC,gBAAiB,EACjBC,YACAC,QAAiB,EACjBC,aAAiB,EACjBC,4BAA6B,EAC7BC,MAAiB,GACjBC,SAAiB,cACfV,EAEH,OAAOW,MAAKC,OAAQ,yCAA0CC,KAAM,SAAUC,GAE7E,GAAIC,GAAgB,WAGfC,EAAMC,KAAKC,KAAOF,EAAMf,SAASK,UAAUU,EAAMC,KAAKC,KAAOF,EAAMf,SAASK,SAC5EU,EAAMC,KAAKC,KAAOF,EAAMf,SAASI,UAAUW,EAAMC,KAAKC,KAAOF,EAAMf,SAASI,SAE5EW,EAAMC,KAAKE,MAAQ,KAAKH,EAAMC,KAAKE,MAAQ,IAC3CH,EAAMC,KAAKE,MAAQ,IAAKH,EAAMC,KAAKE,MAAQ,GAE3CH,EAAMC,KAAKG,IAAMC,SAAUH,KAAMF,EAAMC,KAAKC,MAAOC,MAAOH,EAAMC,KAAKE,MAAM,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AAMS,SAAS6E,KAAKtE,SAAWhB,EAAMS,SAASyC,KAC9ClD,EAAMS,SAASY,KAAKL,SAAWhB,EAAMS,SAASyC,KAC9ClD,EAAM8D,MAAM9C,SAAmBhB,EAAMyD,SACrCzD,EAAMS,SAASyC,IAAIlC,SAAYhB,EAAMyD,SAErCzD,EAAMyD,QAAQiC,YAAa1F,EAAMqF,aAEjCrF,EAAM8D,MAAMc,WAAYe,KAAO,aAAcC,OAAStB,IAEtDtE,EAAMqF,YAAYQ,SAElBtD,GAEA,IAAI2B,GAAelE,EAAM8D,MAAME,UAG9B8B","file":"jquery.datepicker.min.js","sourcesContent":["/**************************************************************************\r\nName: jquery.datepicker.js\r\nDescription: Date picker widget. Requires moment.min.js.\r\nDate Created: 1/23/2013 by Kyle Brickman\r\nModified:\r\n**************************************************************************/\r\n\r\n\r\n( function( $ ){\r\n\t$.fn.datepicker = function( options )\r\n\t{\r\n\t\tvar settings = $.extend({\r\n\t\t\tformat : 'MM-DD-YYYY',\r\n\t\t\toverrideMobile : false,\r\n\t\t\tminYear : -10,\r\n\t\t\tmaxYear : +5,\r\n\t\t\tmySUSTADate : false,\r\n\t\t\thideCSProductPYFlagMessage : false,\r\n\t\t\twidth : \"\",\r\n\t\t\tonSelect : function() {}\r\n\t\t}, options );\r\n\r\n\t\treturn this.filter( 'input[type=\"text\"],input[type=\"date\"]' ).each( function( index ){\r\n\t\t\t// Instantiate bound functions\r\n\t\t\tvar normalizeDate = function( )\r\n\t\t\t{\r\n\r\n\t\t\t\tif( local.date.year > local.settings.maxYear ) local.date.year = local.settings.maxYear;\r\n\t\t\t\tif( local.date.year < local.settings.minYear ) local.date.year = local.settings.minYear;\r\n\r\n\t\t\t\tif( local.date.month > 12 ) local.date.month = 12;\r\n\t\t\t\tif( local.date.month < 1 ) local.date.month = 1;\r\n\r\n\t\t\t\tif( local.date.day > moment( ).year( local.date.year ).month( local.date.month-1 ).date( 10 ).daysInMonth( ))\r\n\t\t\t\t\tlocal.date.day = moment( ).year( local.date.year ).month( local.date.month-1 ).date( 10 ).daysInMonth( );\r\n\r\n\t\t\t\tlocal.date.year = parseInt( local.date.year, 10 );\r\n\t\t\t\tlocal.date.month = parseInt( local.date.month, 10 );\r\n\t\t\t\tlocal.date.day = parseInt( local.date.day, 10 );\r\n\r\n\t\t\t\treturn;\r\n\t\t\t};\r\n\r\n\t\t\tvar drawHeader = function( )\r\n\t\t\t{\r\n\t\t\t\tlocal.calendar.mDec.detach( );\r\n\t\t\t\tlocal.calendar.mInc.detach( );\r\n\t\t\t\tlocal.calendar.yDec.detach( );\r\n\t\t\t\tlocal.calendar.yInc.detach( );\r\n\r\n\t\t\t\tlocal.calendar.month.html( ['','January','February','March','April','May','June','July','August','September','October','November','December'][local.date.month] );\r\n\t\t\t\tlocal.calendar.year.html( ' ' + local.date.year );\r\n\r\n\t\t\t\tlocal.calendar.mDec.appendTo( local.calendar.month );\r\n\t\t\t\tlocal.calendar.mInc.appendTo( local.calendar.month );\r\n\t\t\t\tlocal.calendar.yDec.appendTo( local.calendar.year );\r\n\t\t\t\tlocal.calendar.yInc.appendTo( local.calendar.year );\r\n\r\n\t\t\t\tlocal.calendar.mDec.removeClass( 'disabled' );\r\n\t\t\t\tlocal.calendar.mInc.removeClass( 'disabled' );\r\n\t\t\t\tlocal.calendar.yDec.removeClass( 'disabled' );\r\n\t\t\t\tlocal.calendar.yInc.removeClass( 'disabled' );\r\n\r\n\t\t\t\tif( moment( ).year( local.date.year ).month( local.date.month - 1 ).date( 1 ).add( 'M', -1 ).year( ) < local.settings.minYear ) local.calendar.mDec.addClass( 'disabled' );\r\n\t\t\t\tif( moment( ).year( local.date.year ).month( local.date.month - 1 ).date( 1 ).add( 'M', +1 ).year( ) > local.settings.maxYear ) local.calendar.mInc.addClass( 'disabled' );\r\n\r\n\t\t\t\tif( moment( ).year( local.date.year ).month( 1 ).date( 1 ).add( 'y', -1 ).year( ) < local.settings.minYear ) local.calendar.yDec.addClass( 'disabled' );\r\n\t\t\t\tif( moment( ).year( local.date.year ).month( 1 ).date( 1 ).add( 'y', +1 ).year( ) > local.settings.maxYear ) local.calendar.yInc.addClass( 'disabled' );\r\n\r\n\t\t\t\treturn;\r\n\t\t\t};\r\n\r\n\t\t\tvar drawGrid = function( )\r\n\t\t\t{\r\n\t\t\t\tlocal.calendar.grid.empty( );\r\n\r\n\t\t\t\tvar dates = [];\r\n\r\n\t\t\t\tfor( var i = 1; i <= moment( ).year( local.date.year ).month( local.date.month - 1 ).date( 1 ).daysInMonth( ); i++ )\r\n\t\t\t\t\tdates.push( moment( ).year( local.date.year ).month( local.date.month - 1 ).date( i ));\r\n\r\n\t\t\t\tvar currentYear = moment( ).year( );\r\n\t\t\t\tvar currentMonth = moment( ).month( );\r\n\t\t\t\tvar currentDay = moment( ).date( );\r\n\r\n\t\t\t\tvar firstDate = dates[0];\r\n\t\t\t\tvar lastDate = dates[dates.length - 1];\r\n\r\n\t\t\t\tfor( i = 0; i < firstDate.day( ); i++ )\r\n\t\t\t\t\tdates.unshift( moment( firstDate ).add( 'd', ( i + 1 ) * -1 ));\r\n\r\n\t\t\t\twhile( 0 != dates.length % 7 )\r\n\t\t\t\t{\r\n\t\t\t\t\tdates.push( moment( lastDate ).add( 'd', 1 ));\r\n\t\t\t\t\tlastDate = dates[dates.length - 1];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar newGrid = $( '
    ' );\r\n\r\n\t\t\t\tfor( i = 0; i < dates.length; i++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tvar gridItem = $( '
  1. ' );\r\n\t\t\t\t\tvar gridLink = $( '' );\r\n\r\n\t\t\t\t\tgridLink.text( dates[i].date( ));\r\n\t\t\t\t\tgridLink.attr( 'href', '#' + dates[i].format( 'MM-DD-YYYY' ));\r\n\t\t\t\t\tgridLink.attr( 'title', dates[i].format( 'dddd, MMMM Do, YYYY' ));\r\n\r\n\t\t\t\t\tgridItem.addClass( dates[i].format( 'ddd' ).toLowerCase( ));\r\n\r\n\t\t\t\t\tif( dates[i].month( ) != firstDate.month( ))\r\n\t\t\t\t\t\tgridItem.addClass( 'other' )\r\n\r\n\t\t\t\t\tif( dates[i].year( ) == currentYear && dates[i].month( ) == currentMonth && dates[i].date( ) == currentDay )\r\n\t\t\t\t\t\tgridItem.addClass( 'current' );\r\n\r\n\t\t\t\t\tif( !local.date.empty && dates[i].month( ) + 1 == local.date.month && dates[i].date( ) == local.date.day && dates[i].year( ) == local.date.year )\r\n\t\t\t\t\t\tgridItem.addClass( 'selected' );\r\n\r\n\t\t\t\t\tgridLink.appendTo( gridItem );\r\n\t\t\t\t\tgridItem.appendTo( newGrid );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnewGrid.appendTo( local.calendar.grid );\r\n\r\n\t\t\t\treturn;\r\n\t\t\t};\r\n\r\n\t\t\tvar drawCalendar = function( )\r\n\t\t\t{\r\n\t\t\t\tnormalizeDate( );\r\n\r\n\t\t\t\tdrawHeader( );\r\n\r\n\t\t\t\tdrawGrid( );\r\n\r\n\t\t\t\twriteDate( );\r\n\r\n\t\t\t\treturn;\r\n\t\t\t};\r\n\r\n\t\t\tvar clickTrap = function( evt )\r\n\t\t\t{\r\n\t\t\t\tevt.preventDefault( );\r\n\t\t\t};\r\n\r\n\t\t\tvar nextMonth = function( )\r\n\t\t\t{\r\n\t\t\t\tlocal.date.month += 1;\r\n\r\n\t\t\t\tif( local.date.month > 12 )\r\n\t\t\t\t{\r\n\t\t\t\t\tlocal.date.month = 1;\r\n\t\t\t\t\tlocal.date.year += 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn drawCalendar( );\r\n\t\t\t};\r\n\r\n\t\t\tvar prevMonth = function( )\r\n\t\t\t{\r\n\t\t\t\tlocal.date.month -= 1;\r\n\r\n\t\t\t\tif( local.date.month < 1 )\r\n\t\t\t\t{\r\n\t\t\t\t\tlocal.date.month = 12;\r\n\t\t\t\t\tlocal.date.year -= 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn drawCalendar( );\r\n\t\t\t};\r\n\r\n\t\t\tvar nextYear = function( )\r\n\t\t\t{\r\n\t\t\t\tlocal.date.year += 1\r\n\r\n\t\t\t\treturn drawCalendar( );\r\n\t\t\t};\r\n\r\n\t\t\tvar prevYear = function( )\r\n\t\t\t{\r\n\t\t\t\tlocal.date.year -= 1\r\n\r\n\t\t\t\treturn drawCalendar( );\r\n\t\t\t};\r\n\r\n\t\t\tvar focusEvent = function( )\r\n\t\t\t{\r\n\t\t\t\t$( 'body' ).trigger( 'click' );\r\n\r\n\t\t\t\tdrawCalendar( );\r\n\r\n\t\t\t\tlocal.calendar.all.addClass( 'active' );\r\n\t\t\t\treturn;\r\n\t\t\t};\r\n\r\n\t\t\tvar blurEvent = function( evt )\r\n\t\t\t{\r\n\t\t\t\tif( local.settings.mySUSTADate ) {\r\n\t\t\t\t\t$( 'body' ).find( 'div.searchFilters:not(.open)' ).each( function( ) {\r\n\t\t\t\t\t\tvar active = $( this ).hasClass( 'active' );\r\n\r\n\t\t\t\t\t\tif( active ) {\r\n\t\t\t\t\t\t\t$( this ).css( 'height', 'auto' ).attr( 'data-height', $( this ).height( )).css( 'height', $( this ).height( ));\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$( this ).addClass( 'active' ).attr( 'data-height', $( this ).height( )).removeClass( 'active' );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif( evt && ( $( '*', local.wrapper ).filter( evt.target ).length || local.wrapper.get( 0 ) == evt.target ))\r\n\t\t\t\t\treturn;\r\n\r\n\t\t\t\tlocal.calendar.all.removeClass( 'active' );\r\n\r\n\t\t\t\tif( typeof Placeholders !== 'undefined' )\r\n\t\t\t\t{\r\n\t\t\t\t\tPlaceholders.disable( local.input.get( 0 ));\r\n\t\t\t\t\tPlaceholders.enable( local.input.get( 0 ));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif( !local.input.val( ).length )\r\n\t\t\t\t{\r\n\t\t\t\t\tlocal.date.year = moment( ).year( );\r\n\t\t\t\t\tlocal.date.month = moment( ).month( ) + 1;\r\n\t\t\t\t\tlocal.date.day = moment( ).date( );\r\n\t\t\t\t\tlocal.date.empty = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif( local.settings.hideCSProductPYFlagMessage ) {\r\n\t\t\t\t\tvar currentDate = local.input.val();\r\n\t\t\t\t\tif(currentDate != originalDate) {\r\n\t\t\t\t\t\t$('div.appEditProduct label.viewLabel.materialsNeeded').hide();\r\n\t\t\t\t\t\t$('div.appEditProduct select#approved option:contains(\"Approved\")').prop('disabled', false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(currentDate == originalDate && currentDate.length) {\r\n\t\t\t\t\t\t$('div.appEditProduct label.viewLabel.materialsNeeded').show();\r\n\t\t\t\t\t\t$('div.appEditProduct select#approved option:contains(\"Approved\")').prop('disabled', true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn;\r\n\t\t\t};\r\n\r\n\t\t\tvar enterDate = function( date )\r\n\t\t\t{\r\n\t\t\t\tdate = moment( date );\r\n\r\n\t\t\t\tif( date.isValid( ))\r\n\t\t\t\t{\r\n\t\t\t\t\tlocal.date.month = date.month( ) + 1;\r\n\t\t\t\t\tlocal.date.day = date.date( );\r\n\t\t\t\t\tlocal.date.year = date.year( );\r\n\t\t\t\t\tlocal.date.empty = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdrawHeader( );\r\n\r\n\t\t\t\tdrawGrid( );\r\n\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tvar clickDate = function( )\r\n\t\t\t{\r\n\t\t\t\tvar date = $( this ).attr( 'href' ).replace( '#', '' ).split( '-' );\r\n\r\n\t\t\t\tlocal.date.month = date[0];\r\n\t\t\t\tlocal.date.day = date[1];\r\n\t\t\t\tlocal.date.year = date[2];\r\n\t\t\t\tlocal.date.empty = false;\r\n\r\n\t\t\t\t$( 'li', local.calendar.grid ).removeClass( 'selected' );\r\n\r\n\t\t\t\t$( this ).parent( ).addClass( 'selected' );\r\n\r\n\t\t\t\tlocal.settings.onSelect(local.date.month + \"-\" + local.date.day + \"-\" + local.date.year);\r\n\r\n\t\t\t\twriteDate( );\r\n\t\t\t\tblurEvent( );\r\n\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tvar writeDate = function( )\r\n\t\t\t{\r\n\t\t\t\tif( !local.date.empty )\r\n\t\t\t\t\tlocal.input.maskerade( 'val', local.date.month + '-' + local.date.day + '-' + local.date.year );\r\n\t\t\t}\r\n\r\n\t\t\tvar reset = function( )\r\n\t\t\t{\r\n\t\t\t\tif( local.input.val( ).length )\r\n\t\t\t\t{\r\n\t\t\t\t\tenterDate( resetValue );\r\n\t\t\t\t\twriteDate( );\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tblurEvent( );\r\n\t\t\t}\r\n\r\n\t\t\t// Establish root container\r\n\t\t\tvar local = {};\r\n\r\n\t\t\t// Establish local settings\r\n\t\t\tlocal.settings = settings;\r\n\r\n\t\t\tif( navigator.userAgent.match(/(iPad|iPhone|iPod|Android)/g) && !local.settings.overrideMobile )\r\n\t\t\t{\r\n\t\t\t\tif( $( this ).val( ).length )\r\n\t\t\t\t\t$( this ).val( moment( $( this ).val( ), local.settings.format ).format( 'YYYY-MM-DD' ));\r\n\r\n\t\t\t\t$( this ).attr( 'type', 'date' );\r\n\r\n\t\t\t\t//Added for mobile placeholder issue\r\n\t\t\t\t$( this ).on( 'focus', $( this ).attr( 'type', 'date' ) );\r\n\t\t\t\t$( this ).on( 'blur', $( this ).attr( 'type', 'text' ) );\r\n\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Normalize date settings\r\n\t\t\tif( 'now' == local.settings.minYear ) local.settings.minYear = moment( ).year( );\r\n\t\t\tif( 'now' == local.settings.maxYear ) local.settings.maxYear = moment( ).year( );\r\n\r\n\t\t\tlocal.settings.minYear = parseInt( local.settings.minYear, 10 );\r\n\t\t\tlocal.settings.maxYear = parseInt( local.settings.maxYear, 10 );\r\n\r\n\t\t\tif( local.settings.minYear < 999 && local.settings.maxYear < 999 )\r\n\t\t\t{\r\n\t\t\t\tlocal.settings.minYear = moment( ).year( ) + local.settings.minYear;\r\n\t\t\t\tlocal.settings.maxYear = moment( ).year( ) + local.settings.maxYear;\r\n\t\t\t}\r\n\r\n\t\t\tif( local.settings.minYear < 999 ) local.settings.minYear = local.settings.maxYear + local.settings.minYear;\r\n\t\t\tif( local.settings.maxYear < 999 ) local.settings.maxYear = local.settings.minYear + local.settings.minYear;\r\n\r\n\t\t\tif( local.settings.minYear > local.settings.maxYear )\r\n\t\t\t{\r\n\t\t\t\tvar temp = local.settings.minYear;\r\n\t\t\t\tlocal.settings.minYear = local.settings.maxYear;\r\n\t\t\t\tlocal.settings.maxYear = temp;\r\n\t\t\t}\r\n\r\n\t\t\t// Retrieve and create DOM elements\r\n\t\t\tlocal.date = {};\r\n\t\t\tlocal.date.year = moment( ).year( );\r\n\t\t\tlocal.date.month = moment( ).month( ) + 1;\r\n\t\t\tlocal.date.day = moment( ).date( );\r\n\t\t\tlocal.date.empty = false;\r\n\t\t\tlocal.calendar = {};\r\n\t\t\tlocal.container = $( this ).parent( );\r\n\t\t\tlocal.placeholder = $( '' );\r\n\t\t\tlocal.wrapper = $( '
    ' );\r\n\t\t\tlocal.input = $( this );\r\n\t\t\tlocal.calendar.all = $( '
    ' );\r\n\t\t\tlocal.calendar.month = $( '
    ' );\r\n\t\t\tlocal.calendar.year = $( '
    ' );\r\n\t\t\tlocal.calendar.mDec = $( '' );\r\n\t\t\tlocal.calendar.mInc = $( '' );\r\n\t\t\tlocal.calendar.yDec = $( '' );\r\n\t\t\tlocal.calendar.yInc = $( '' );\r\n\t\t\tlocal.calendar.days = $( '
      ' );\r\n\t\t\tlocal.calendar.grid = $( '
      ' );\r\n\r\n\t\t\t// Insert temporary placeholder\r\n\t\t\tlocal.placeholder.insertBefore( local.input );\r\n\t\t\tlocal.input.detach( );\r\n\r\n\t\t\t// Set attributes\r\n\t\t\tlocal.calendar.mDec.attr( 'href', '#dec' ); local.calendar.mDec.attr( 'title', 'Previous Month' ); local.calendar.mDec.text( '\\u25B2' );\r\n\t\t\tlocal.calendar.mInc.attr( 'href', '#inc' ); local.calendar.mInc.attr( 'title', 'Next Month' ); local.calendar.mInc.text( '\\u25BC' );\r\n\t\t\tlocal.calendar.yDec.attr( 'href', '#dec' ); local.calendar.yDec.attr( 'title', 'Previous Year' ); local.calendar.yDec.text( '\\u25B2' );\r\n\t\t\tlocal.calendar.yInc.attr( 'href', '#inc' ); local.calendar.yInc.attr( 'title', 'Next Year' ); local.calendar.yInc.text( '\\u25BC' );\r\n\r\n\t\t\tlocal.input.removeAttr( 'style' );\r\n\r\n\t\t\tif( undefined != local.input.val( ) && '' != local.input.val( ) && local.input.val( ) != local.input.attr( 'placeholder' ))\r\n\t\t\t{\r\n\t\t\t\tvar date = moment( local.input.val( ), local.settings.format );\r\n\t\t\t\tlocal.date.year = date.year( );\r\n\t\t\t\tlocal.date.month = date.month( ) + 1;\r\n\t\t\t\tlocal.date.day = date.date( );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tlocal.date.empty = true;\r\n\r\n\t\t\t// Set classes\r\n\t\t\tlocal.wrapper.addClass( 'datepicker ' + local.input.attr( 'class' ));\r\n\r\n\t\t\tif( local.settings.width.length ) {\r\n\t\t\t\t$( local.calendar.all ).css( \"width\", local.settings.width );\r\n\t\t\t}\r\n\r\n\t\t\tlocal.calendar.month.addClass( 'month' );\r\n\t\t\tlocal.calendar.year.addClass( 'year' );\r\n\t\t\tlocal.calendar.days.addClass( 'days' );\r\n\t\t\tlocal.calendar.grid.addClass( 'grid' );\r\n\t\t\tlocal.input.removeAttr( 'class' );\r\n\r\n\t\t\tif( local.wrapper.hasClass( 'outerLabel' )) local.input.addClass( 'outerLabel' );\r\n\r\n\t\t\t// Bind events\r\n\t\t\tlocal.calendar.mDec.on( 'click', clickTrap ).on( 'click', prevMonth );\r\n\t\t\tlocal.calendar.mInc.on( 'click', clickTrap ).on( 'click', nextMonth );\r\n\t\t\tlocal.calendar.yDec.on( 'click', clickTrap ).on( 'click', prevYear );\r\n\t\t\tlocal.calendar.yInc.on( 'click', clickTrap ).on( 'click', nextYear );\r\n\r\n\t\t\t$( local.calendar.grid ).on( 'click', 'a', clickTrap ).on( 'click', 'a', clickDate );\r\n\r\n\t\t\tlocal.input.on( 'focus', focusEvent );\r\n\t\t\tlocal.input.on( 'change', writeDate );\r\n\t\t\tlocal.input.on( 'reset', reset );\r\n\t\t\t$( 'body' ).on( 'click', blurEvent );\r\n\t\t\t$('input').on('focusout', blurEvent);\r\n\r\n\t\t\t// Append elements\r\n\t\t\t$( '
    1. S
    2. ' ).appendTo( local.calendar.days );\r\n\t\t\t$( '
    3. M
    4. ' ).appendTo( local.calendar.days );\r\n\t\t\t$( '
    5. T
    6. ' ).appendTo( local.calendar.days );\r\n\t\t\t$( '
    7. W
    8. ' ).appendTo( local.calendar.days );\r\n\t\t\t$( '
    9. T
    10. ' ).appendTo( local.calendar.days );\r\n\t\t\t$( '
    11. F
    12. ' ).appendTo( local.calendar.days );\r\n\t\t\t$( '
    13. S
    14. ' ).appendTo( local.calendar.days );\r\n\r\n\t\t\tlocal.calendar.mDec.appendTo( local.calendar.month );\r\n\t\t\tlocal.calendar.mInc.appendTo( local.calendar.month );\r\n\t\t\tlocal.calendar.yDec.appendTo( local.calendar.year );\r\n\t\t\tlocal.calendar.yInc.appendTo( local.calendar.year );\r\n\t\t\tlocal.calendar.month.appendTo( local.calendar.all );\r\n\t\t\tlocal.calendar.year.appendTo( local.calendar.all );\r\n\t\t\tlocal.calendar.days.appendTo( local.calendar.all );\r\n\t\t\tlocal.calendar.grid.appendTo( local.calendar.all );\r\n\t\t\tlocal.input.appendTo( local.wrapper );\r\n\t\t\tlocal.calendar.all.appendTo( local.wrapper );\r\n\r\n\t\t\tlocal.wrapper.insertAfter( local.placeholder );\r\n\r\n\t\t\tlocal.input.maskerade({ mask : 'mm-dd-yyyy', change : enterDate });\r\n\r\n\t\t\tlocal.placeholder.remove( );\r\n\r\n\t\t\tdrawCalendar( );\r\n\r\n\t\t\tvar originalDate = local.input.val();\r\n\t\t});\r\n\t};\r\n})( jQuery );"]}