I use WebDatePicker whith webmonthCalendar.
To open the calendar, I have to use the blue arrow.
Is it possible, instead to use a button with an image of calendar on the right of the control, like
most websites use.
Hello drpoalim,
Thank you for posting in the community.
You can configure a custom button to be used with WebDatePicker in this scenario, as described at:
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2012.1/CLR4.0/html/WebDatePicker_Using_Custom_Button_in_WebDatePicker.html
Note that the custom button can also be styled with an image via theImageUrlproperty, if necessary.
Please let me know if this helps.
I add an image.
I get exception on postback:
This is the code I am writing:
Please feel free to contact me if any additional questions regarding this scenario arise.
Great!
Thanks.
It should be possible to use the control's Init event for this task.
Is it possible to do it on any of the control's events?
I want to create my own inherited control from your control.
Thank you for your reply.
Setting the ImageUrl dynamically from the code behind should be done at the PreInit stage (Init stage if a master page is used) in order to ensure that the control's viewstate is properly reloaded:
protected override void OnPreInit(EventArgs e) { base.OnPreInit(e); WebDatePicker2.Buttons.CustomButton.ImageUrl = "ig_res/Default/images/igmc_headerbg.png"; }
Hope this helps.