Force an end date for pledges taken via your website

In answer to a query from the Blackbaud user forums we created the below code to go in an ‘Unformatted Text’ part on the same page as the donation form

We should have the ability to limit the ending date for pledges made through NetCommunity, so that pledges could not extend past the end of the year for example.

The code

<script type="text/javascript">
var maxDate = new Date(Date.parse('31 December 2014'));

eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('6 n(7,5){2 3;3=(5.9()-7.9())*B;3-=7.a()+1;3+=5.a();2 q=7.k();2 r=5.k();e(q<r){3+=1}m 3<=0?0:3}6 f(d){2 g=d.h();2 i=d.a()+1;2 j=d.9();m g+"-"+i+"-"+j}$(E).w(6(){$(\'[8*=l]\').c(4);$(\'[8*=o]\').y(4);4()});6 4(){2 p=$(\'[8*=l]\').R(\'h\');2 b=n(p,s)+1;2 t=z($(A).u(),C);e(t>b){$(\'[8*=o]\').u(b).c();D(\'v F G H I J K L \'+f(s)+\'. v M N O P Q x.\')}}',54,54,'||var|months|updateInstallments|d2|function|d1|id|getFullYear|getMonth|maxMonths|change||if|getDateStr|curr_date|getDate|curr_month|curr_year|getDay|_Recurrence_DatePickerStart|return|monthDiff|_txtInstallments|now|day1|day2|maxDate|cur|val|We|ready|accordingly|keyup|parseInt|this|12|10|alert|document|are|only|taking|pledges|ending|up|to|have|adjusted|your|pledge|installments|datepicker'.split('|'),0,{}))
</script>