Tag Archives: Few Interesting

jQuery UI Datepicker

jquery-ui-datepicker




To set current date in control to which jQuery UI datepicker bind, use setDate() method. Pass date object which needs to be set as an argument to setDate() method. If you want to set it to current date then you can pass ‘today’ as argument. So, jQuery code to set current date may look like something similar, $(document).ready(function() { $(‘#txtDate’).datepicker(‘setDate’, ‘today’); }); But Wait!!! Above jQuery code will not work. It will not set the current date. Wondering why? Well, […]