JQuery easyui and Datejs date conflict -


there conflict between jquery-easyui datebox (http://www.jeasyui.com/documentation/index.php) , datejs api (http://www.datejs.com/). jquery-easyui version 1.3.3 .

when both included in jsp page, poped calendar's current date jan, 1970. not find methods set datebox's value current date (do not want use string default value rather current date should automatically set). tried using following code explained in documentation

//get calendar object var c = $('#dtbduefrom').datebox('calendar'); // set first day of week monday c.calendar({     current: new date() }); } 

but throws exception typeerror: $.data(...) undefined.

$('#dtbduefrom').datebox({current: new date()}); 

this not work either.

datejs helpful library , cannot remove project need methods provides. eliminating works absolutely fine there workaround both work along. thanks.

i still not find exact solution problem above here workaround used make datebox work according need

due date <input id="dateduetxt" class="easyui-datebox" style="width:100px"/>    <script>  $('#dateduetxt').datebox({     value: (new date().tostring('dd-mmm-yyyy')), /* date.js tostring function convert date format being used datebox. */     formatter : function(date){         return date.tostring('dd-mmm-yyyy');     },     parser : function(s){         var t = date.parse(s);         if (!isnan(t)){             return new date(t);         } else {             return null;         }     } });  </script> 

Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -