Click here to Skip to main content
15,844,904 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a calendar. I want to display date in format like(Sat Nov 12)

but currently, It is showing like(11/12/2022).

But Required format(Sat Nov 12).

What I have tried:

$(function () {
                numberOfMonths: 1,
                onSelect: function (selected) {
                    var dt = new Date(selected);
                    dt.setDate(dt.getDate() + 1);
                    $("#txtTo").datepicker("option", "minDate", selected);

Also, I have tired like this type
$(function() {  
    dateFormat: 'yy-mm-dd'
  }).bind("change", function() {
    var minValue = $(this).val();
    minValue = $.datepicker.parseDate("yy-mm-dd", minValue);
    minValue = minValue.getDate() + 1;
    minValue = $.datepicker.parseDate("ddd MMM,dd", minValue);
    $("#txtFrom").datepicker("option", "minDate", minValue);

but ,it's not working correctly
Updated 10-Nov-22 12:21pm

1 solution

I did a quick Google Search: jquery datepicker format - Google Search[^] and found many helpful results.

Here is the first result found: jQuery UI DatePicker - Change Date Format - StackOverflow[^]
There are many others if the above is not suitable.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900