Hi,
because of specific client wishes, I need to show a grid with lots of information starting yesterday.
The begindate for this grid, is decided using a WebDatePicker.
The user now asks if he can use the bottom "Today" functionality to go to "Yesterday" thus saving to always choose the correct date.
I can replace the string in footercontent with the wanted result, but I'm unable to catch te event?
(see printscreen for wanted result)
Any help would be appreciated.
Extra info:
* I tried to ass a javascript function around it, but the function did not get executed because of the postback that happens on choosing the date.
<ig:WebDatePicker ID="wdcStart" CssClass="dateAndTime dateChooser" Width="117px" runat="server" AllowNull="False" meta:resourcekey="wdcStartResource1" EditMode="CalendarOnly" AutoPostBackFlags-ValueChanged="On" />
Hello Razieltje ,
Thank you for posting in our forum.
If you set the selected date on the MouseDown event with the set_selectedDate method it seems that you’ll be able to set manually the date and that will be the value passed to the server over the postback so it will not be lost.
Please refer to the attached sample and let me know whether that will work for your scenario.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support
Hi Maya,
and thank you for the reply.
This worked indeed.
I did have to change some small things to work on both FF and IE :)
--------
function MonthCalendarClick(sender, e) { /*Important! while debugging, stay on the field!!*/ var clsName; if (e.get_browserEvent().srcElement) { clsName = e.get_browserEvent().srcElement.className; } else if (e.get_browserEvent().originalTarget) { clsName = e.get_browserEvent().originalTarget.className; } if (clsName == "igmc_Footer igmc_HoverFooter") { sender.set_selectedDate(yesterday, e); }}
We have been using the WebDateChooser 11.1 to get a datepicker control with some quick-select date links. Sample image shown below.
I could not easily find a way to get something similar at the bottom of the WebDatePicker 12.2.
Any ideas/workarounds?
We were doing it in the WebDateChooser 11.1 using 3 linkbuttons in the footer template; footer templates have been discontinued in the WebDatePicker.
<igsch:WebDateChooser id="DateChooser" runat="server" NullDateLabel=""> <FooterTemplate> <table id="Table1" cellspacing="0" cellpadding="0" width="100%" border="0"> <tr> <td align="right"> <asp:LinkButton id="LinkButton1" CausesValidation="False" runat="server" OnPreRender="linkbutton1_OnPreRender" CssClass="DateFooter">Today</asp:LinkButton></td> <td align="center"> <asp:LinkButton id="LinkButton3" CausesValidation="False" runat="server" OnPreRender="linkbutton3_OnPreRender" CssClass="DateFooter"></asp:LinkButton></td> <td align="left"> <asp:LinkButton id="LinkButton2" CausesValidation="False" runat="server" OnPreRender="linkbutton2_OnPreRender" CssClass="DateFooter"></asp:LinkButton></td> </tr> </table> </FooterTemplate></igsch:WebDateChooser>