Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8582901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:24:38+00:00 2026-06-11T21:24:38+00:00

I am currently trying to implement a date range search function using Obout Calendar

  • 0

I am currently trying to implement a date range search function using Obout Calendar controls. The idea is that the user can select a date from the Obout calendar which will then fill a asp:TextBox beside it. There are other fields in the form, but this is the one that’s breaking. I also have a asp:Button at the bottom of the form who’s function is to clear all fields in the form. It does this in the code behind with this:

protected void btnClearFields_Click(object sender, EventArgs e)
{
    txtFrom.Text = "";
    txtTo.Text = "";
}

And here is the relevant front end code:

<table>
    <tr>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <td>
                    <asp:Label ID="lblFrom" runat="server" Text="From:"></asp:Label>
                    <br />
                </td>
                <td>
                    <asp:TextBox ID="txtFrom" runat="server"></asp:TextBox>
                </td>
                <td>
                    <obout:Calendar runat="server" ID="CalendarFrom" TextBoxId="txtFrom" StyleFolder="Calendar/styles/orbitz" ScriptPath="Calendar/calendarscript" DatePickerButtonText <IMG src='Images/calendar.gif' align=absMiddle border=0>" ShowYearSelector="true" DateMin="1/1/1900" AllowDeselect="false" DatePickerMode="true" />
                </td>
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>
                <td>
                    <asp:Label ID="lblTo" runat="server" Text="To:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtTo" runat="server"></asp:TextBox>
                </td>
                <td>
                    <obout:Calendar runat="server" ID="CalendarTo" TextBoxId="txtTo" StyleFolder="Calendar/styles/orbitz" ScriptPath="Calendar/calendarscript" DatePickerButtonText <IMG src='Images/calendar.gif' align=absMiddle border=0>" ShowYearSelector="true" DateMin="1/1/1900" AllowDeselect="false" DatePickerMode="true" />
                </td>
            </ContentTemplate>
        </asp:UpdatePanel>
    </tr>
</table>

Now, the problem I am having is that when I first load the page, all is well. I can select a date from the calendars and it will fill in the text boxes as expected. However, if I click the “Clear Fields” button, which causes a partial postback, then things go wrong. When I go to click on the calendar icon again (after the fields have been cleared), the formatting of the date selector that pops up is messed up. The calendar portion of it is just a red square, can’t select any dates. The year selector bar stretches across the entire screen, and changing the year doesn’t do anything for the calendar.

I couldn’t find any similar problems in my research, so I am not sure what to try. I have tried using only one UpdatePanel around the entire table, but then I get the same problem. I have also tried not including the calendar in the UpdatePanels, which will not “break” the calendars, but it will put two new TextBox fields on my webpage (which will accept any new values from the calendar) and not clear the old ones. Also tried putting both the button and the table containing the calendar in the same UpdatePanel, but I get the same red box there too.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:24:39+00:00Added an answer on June 11, 2026 at 9:24 pm

    Found a very similar problem in this answer. I had encountered the problem of my UpdatePanel duplicating contents when I didn’t include the Obout calendar in it. I fixed this problem by moving my UpdatePanels to surround only the asp:TextBox like so:

    <td>
        <asp:Label ID="lblFrom" runat="server" Text="From:"></asp:Label>
        <br />
    </td>
    <td>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:TextBox ID="txtFrom" runat="server"></asp:TextBox>
            </ContentTemplate>
        </asp:UpdatePanel>
    </td>
    <td>
        <obout:Calendar runat="server" ID="CalendarFrom" TextBoxId="txtFrom" StyleFolder="Calendar/styles/orbitz" ScriptPath="Calendar/calendarscript" DatePickerButtonText <IMG src='Images/calendar.gif' align=absMiddle border=0>" ShowYearSelector="true" DateMin="1/1/1900" AllowDeselect="false" DatePickerMode="true" />
    </td>
    

    This also meant that I did not have to update the Obout Calendar, which solved the original problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently trying to implement some kind of search system in a program of
I'm currently trying to implement a socket server that enables the clients to send
I'm currently trying to implement a Table View on my iPhone app that grabs
so i'm currently trying to implement a currency conversion script using Jquery, curl, ajax
I am currently trying to implement the wonderful jQuery plugin 'week calendar' ( here
I am currently trying to implement the built-in Silverlight 3 validation against objects that
I am currently trying to implement a graph on a website from a raw
I am currently trying to implement Conway's Game of Life in a Code, and
I am currently trying to implement a PNG encoder in C++ based on libpng
I'm currently trying to implement a simple Add-In for InfoPath 2010 Filler/Editor mode, which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.