Hi i am using an date picker on selecting a date the date is displayed in this format month/date/year .... How to convert the date to this format year-month-date in date picker js itself
            Asked
            
        
        
            Active
            
        
            Viewed 3,144 times
        
    3
            
            
        - 
                    Possible duplicate of http://stackoverflow.com/questions/1328025/jquery-ui-datepicker-change-date-format – nc3b Jun 01 '10 at 08:13
2 Answers
1
            
            
        This will apply the date format to all datepickers that are created after:
$.datepicker.setDefaults({
    dateFormat: 'dd.mm.yy'
});
Or to apply to a specific datepicker:
$('#selector').datepicker({
    dateFormat: 'dd.mm.yy'
});
 
    
    
        Tatu Ulmanen
        
- 123,288
- 34
- 187
- 185
1
            Date.firstDayOfWeek = 0; Date.format = 'yyyy-mm-dd'; $(function() { $('.date-pick').datePicker() });
 
    
    
        Prabhu M
        
- 2,852
- 8
- 37
- 54
