Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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 .

HTML
<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

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

and if possible use date picker.js file into your project solution.
 
Share this answer
 
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, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900