Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have one devexpress dateedit control.i am trying to provide navigation to it.i kept two buttons "next" and "prev" when user click next button i want to change the current date to next date for example if current date is 02/feb next date is 03/feb like that.similarly for previous button.

how i can achieve this using java script.

Thanks in advance.

Arasu
Posted
Comments
psgviscom 2-Feb-12 10:39am    
Are you using ASP.net?

If you are using ASP.NET, then Calendar option is available in the tool bar. It will automatically navigate to the previous and next date.
 
Share this answer
 
Hi,

I don't know why you need prev/next buttons when you have calendar as dropdown
and you can select any date from it!

Anyway, I think this will do exactly what you want:
ASP.NET
<dx:aspxdateedit id="ASPxDateEdit1"  runat="server" ClientInstanceName="myDateEdit" Date="02/02/2012 10:00:00">
</dx:aspxdateedit>
<dx:aspxbutton id="ASPxButton1"  runat="server" autopostback="False" EnableClientSideAPI="True" Text="Previous date">
		<ClientSideEvents click="function(s, e) {
			 myDateEdit.setDate(myDateEdit.getDate() - 1);
		}" />
</dx:aspxbutton>
<dx:aspxbutton id="ASPxButton2"  runat="server" autopostback="False" EnableClientSideAPI="True" Text="Next date">
		<ClientSideEvents click="function(s, e) {
			 myDateEdit.setDate(myDateEdit.getDate() + 1);
		}" />
</dx:aspxbutton>


BTW.
DevExpress have excellent demos[^] and documentation[^] sites with so many examples. :)
 
Share this answer
 
v3

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