!function(t,e,a,i){"use strict";function r(e,a){this.element=e,this.$el=t(this.element),this.settings=t.extend({},s,a),this._defaults=s,this._name=n,this.init()}var n="forminatorFrontDatePicker",s={};t.extend(r.prototype,{init:function(){var e=this,a=this.$el.data("format"),i=this.$el.data("restrict-type"),r=this.$el.data("restrict"),n=this.$el.data("restrict"),s=this.$el.data("start-year"),o=this.$el.data("end-year");n=!isNaN(parseFloat(n))&&isFinite(n)?[n.toString()]:r.split(","),s||(s="c-10"),o||(o="c+10");var c=function(t){return"week"===i?e.restrict_week(n,t):e.restrict_custom(n,t)};this.$el.datepicker({beforeShow:function(t,e){e.dpDiv.addClass("forminator-datepicker--cal")},beforeShowDay:c,changeMonth:!0,changeYear:!0,dateFormat:a,yearRange:s+":"+o,minDate:new Date(s,0,1),maxDate:new Date(o,11,31),onClose:function(){t(this).valid()}})},restrict_week:function(t,e){var a=e.getDay();return-1!==t.indexOf(a.toString())?[!1,"disabledDate"]:[!0,"enabledDate"]},restrict_custom:function(t,e){var a=[];a[0]="January",a[1]="February",a[2]="March",a[3]="April",a[4]="May",a[5]="June",a[6]="July",a[7]="August",a[8]="September",a[9]="October",a[10]="November",a[11]="December";var i=e.getMonth(),r=e.getDate(),n=e.getFullYear(),s=r+" "+a[i]+" "+n;return-1!==t.indexOf(s)?[!1,"disabledDate"]:[!0,"enabledDate"]}}),t.fn[n]=function(e){return this.each(function(){t.data(this,n)||t.data(this,n,new r(this,e))})}}(jQuery,window,document);