Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1708
WebDatePicker v11.1 clearing styles
posted

Hi Folks

The fact that this WebDatePicker control is clearing styles is literally killing mountains of time trying to format what would have been extremely simple formatting (basically NO formatting). Trying to get this control to line-up horizontally with validators is a technical HTML nightmare. You get them lined up and calendars don't stay popped up. You get the pop-ups to work and validators make the HTML look like scrambled eggs.

Three questions:

1. Is there anyway to negate/remove/override the default behavior in this control in regards to styling. I need to have it work simply like the default calendar in vanilla ASP.NET or other vendor date/calendar control. Let's say Peter Blums, because this is what the company has been using for the last 6 years.

2. For the life of me, clearing these styles, so I can get alignment proper horizontal alignment is a total nightmare. In my example below, getting these to align with div tags works, but the calendar staying popped up is sporadic and is disfunctional. This is a common scenario, having date ranges throughout all of our applications.

3. Will you create a "101" example, showing how you'd create 2 webdatepicker columns with label text AND normal 101 validators that looks intelligent in terms of display, works as a normal validator and keeps pop-ups staying popped up.

                            <asp:Panel ID="pnlAddEditLicenseTerm" runat="server" Visible="false">
                                <table style="width: 100%;">
                                    <tr>
                                        <td width="15%" style="text-align: right">
                                            &nbsp;
                                        </td>
                                        <td width="85%">
                                            <i>Enter the effective dates for the renewal period for this license.</i>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right" width="15%">
                                            Begin Effective Date:
                                        </td>
                                        <td width="85%">
                                            <div id="Div4">
                                                <div style="float: left">
                                                    <ig:WebDatePicker ID="dtbLicenseBeginDate" runat="server">
                                                        <Buttons>
                                                            <CustomButton ImageUrl="~/images/icon-calendar.gif" />
                                                        </Buttons>
                                                    </ig:WebDatePicker>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="dtbLicenseBeginDate"
                                                        Display="Dynamic" ForeColor="Red" ErrorMessage="Required" SetFocusOnError="True"
                                                        ValidationGroup="LT"></asp:RequiredFieldValidator>
                                                </div>
                                                <div style="float: left">
                                                    <table style="width: 100%;">
                                                        <tr>
                                                            <td width="65%" style="text-align: left">
                                                                &nbsp;* &nbsp; Expiration Date:
                                                            </td>
                                                            <td width="35%">
                                                                <ig:WebDatePicker ID="dtbLicenseExpirationDate" runat="server">
                                                                    <Buttons>
                                                                        <CustomButton ImageUrl="~/images/icon-calendar.gif" />
                                                                    </Buttons>
                                                                </ig:WebDatePicker>
                                                                <asp:CompareValidator ID="valdtbLicenseExpirationDate" runat="server" ControlToValidate="dtbLicenseExpirationDate"
                                                                    Display="Dynamic" Type="Date" ForeColor="Red" ErrorMessage="Expiration Date is not a valid date. Date must be in the format MM/DD/YYYY."
                                                                    Operator="DataTypeCheck" SetFocusOnError="True" ValidationGroup="LT">
                                                                </asp:CompareValidator>
                                                                <asp:CompareValidator ID="valEndAfterStartLcBeginExpire" runat="server" ControlToCompare="dtbLicenseBeginDate"
                                                                    ControlToValidate="dtbLicenseExpirationDate" Display="Dynamic" ForeColor="Red"
                                                                    ErrorMessage="Expiration Date can not be before Begin Date." Operator="GreaterThanEqual"
                                                                    Type="Date" SetFocusOnError="True" ValidationGroup="LT">
                                                                </asp:CompareValidator>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                                <%--<div style="clear: left">
                                                </div>--%>
                                        </td>
                                    </tr>
                                </table>
                                <%--<div style="clear: left">
                                </div>--%>
                            </asp:Panel>

I've been consistently  less than happy with both the response timing and the resulting recommendations and I'm starting to post these questions on other ASP.NET forums now as well.

rob