Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
am using the date picker, it displays the date in month/day/year format. but i need to display in day/month/year format,Help me






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

            $('#ctl00_MainContentPlaceHolder_dateofbirth').datepick({ showOnFocus: false, showTrigger: '#Img1' });
        });
</script>


<input type="text" id="dateofbirth" name="dateofbirth" maxlength="25" runat="server"  />

<img id="Img1" src="CSS/new/images/calendar.gif"  />
Posted

1 solution

Hello,

By looking at you script i cant tell becouse it depends on whcih datepicker you are using.try to use following way
$(..).datepick({ showOnFocus: false,
timeFormat: 'hh:mm:ss',
dateFormat: 'dd/mm/yy',
showTrigger: '#Img1' });


Apart from your query(Qtion) I found that you are using client side id
('#ctl00_MainContentPlaceHolder_dateofbirth')that is not the good way,better use '<%=dateofbirth.ClientID%>' which will change automaticaly.
when renders

EnJoy CoDING
 
Share this answer
 
Comments
priya from Madras 1-Mar-12 9:13am    
thanks kishore , working fine
kishore sharma 1-Mar-12 9:16am    
tell me did you copied that control id from browser viewsource.
-->#ctl00_MainContentPlaceHolder_dateofbirth
priya from Madras 1-Mar-12 10:29am    
s
priya from Madras 1-Mar-12 10:30am    
s kishore
kishore sharma 1-Mar-12 23:54pm    
hello gm dont do like that follow the way i said......

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