jquery ui datepicker - DateRangePicker Is not Working Properly In application.js -



jquery ui datepicker - DateRangePicker Is not Working Properly In application.js -

in application.js

//===== daterangepicker plugin =====// $('#reportrange').daterangepicker( { startdate: moment().subtract('days', 29), enddate: moment(), mindate: '01/01/2012', maxdate: '12/31/2014', datelimit: { days: 60 }, ranges: { 'today': [moment(), moment()], 'yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)], 'last 7 days': [moment().subtract('days', 6), moment()], 'this month': [moment().startof('month'), moment().endof('month')], 'last month': [moment().subtract('month', 1).startof('month'), moment().subtract('month', 1).endof('month')] }, opens: 'left', buttonclasses: ['btn'], applyclass: 'btn-small btn-info btn-block', cancelclass: 'btn-small btn-default btn-block', format: 'mm/dd/yyyy', separator: ' ', locale: { applylabel: 'submit', fromlabel: 'from', tolabel: 'to', customrangelabel: 'custom range', daysofweek: ['su', 'mo', 'tu', 'we', 'th', 'fr','sa'], monthnames: ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'], firstday: 1 } }, function(start, end) { $('#reportrange .date-range').html(start.format('<i>d</i> <b><i>mmm</i> <i>yyyy</i></b>') + '<em> - </em>' + end.format('<i>d</i> <b><i>mmm</i> <i>yyyy</i></b>')); window.location.href= window.location.pathname + '?start='+start._d.gettime()/1000+'&end'+end._d.gettime()/1000; }, function geturlvalue(varsearch){ var searchstring = window.location.search.substring(1); var variablearray = searchstring.split('&'); for(var = 0; < variablearray.length; i++){ var keyvaluepair = variablearray[i].split('='); if(keyvaluepair[0] == varsearch){ homecoming keyvaluepair[1]; } } }

);

when alter date date range tool date values sended url >value in date tool remains unchanged(doesn't update per choice). please help me..

thanks

jquery-ui-datepicker date-range daterangepicker

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -