Click here to Skip to main content
14,421,614 members
Rate this:
Please Sign up or sign in to vote.
See more:
I having problem setting up format date property. right now i am getting "07/19/2012" , but i want show like "Thursday, 5 July, 2012" This.

i add this code in head of my aspx page but it is not working .

<script type="text/javascript">
     $(document).ready(function() {
         $("#datepicker").datepicker();
         $("#format").change(function() {
             $("#datepicker").datepicker("option", "DD, d MM, yy", $(this).val());
         });
     }); 



What i am doing wrong.
Posted
Comments
SumTinWong 10-Jul-12 19:28pm
   
you want in that format and minus 14 days?

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

<script>
    $(function() {
        $( "#date picker" ).datepicker({
            altFormat: "DD, d MM, yy"
        });
    });
</script>

and if possible use date picker.js file into your project solution.
   
Comments
anjumnavid 11-Jul-12 15:20pm
   
<div id="datepicker" ></div>
<input type="text" id="datepicker_value" />

<script type="text/javascript">
$().ready(function() {

$("#datepicker").datepick(
{

onSelect: function(dateText, inst) { $("#datepicker_value").val(dateText); } });

});


Above code just work fine , only i need to change dateformat. I tried your solution ,but i still no luck.

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100