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 7408197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:52:14+00:00 2026-05-29T05:52:14+00:00

I am using datepicker to select date in datalist control in asp.net. The scenario

  • 0

I am using datepicker to select date in datalist control in asp.net. The scenario is the user selects the date for 2 textboxes and then click on the export to excel button , then the system generates the excel file with the data within the given dates.The issue is I want to restrict the user to select the date before clicking on export button, and the 2nd date selected should be greater than the first date selected using Jquery , below is the code:

<asp:Button runat="server" ID="btnExportbwDates" 
    Text="Export between Dates" onclick="btnExportbwDates_Click" />
    <asp:TextBox runat="server" ID="txtDateRangeOne" CssClass="txtDateRangeOne"></asp:TextBox>
    <asp:TextBox runat="server" ID="txtDateRangeTwo" CssClass="txtDateRangeTwo"></asp:TextBox>

     <script type="text/javascript">
    $(document).ready(function () {

        var pickerOpts = {
            dateFormat: "dd/mm/yy"

        };

        $(".txtDateRangeOne").datepicker(pickerOpts);
        $(".txtDateRangeTwo").datepicker(pickerOpts);

    });
</script>
  • 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-05-29T05:52:18+00:00Added an answer on May 29, 2026 at 5:52 am
        $(document).ready(function () {
                var dates = $(".txtDateRangeOne, .txtDateRangeTwo").datepicker({
                    showOtherMonths: true,
                    selectOtherMonths: true,
                    showOn: "both",
                    showAnim: "slide",
                    showButtonPanel: true,
                    changeMonth: true,
                    changeYear: true,
                    numberOfMonths: 2,
                    buttonImageOnly: true,
                    onSelect: function (selectedDate) {
                        var option = this.className.indexOf("txtDateRangeOne") >= 0 ? "minDate" : "maxDate";
                        instance = $(this).data("datepicker"),
                            date = $.datepicker.parseDate(
                                instance.settings.dateFormat ||
                                $.datepicker._defaults.dateFormat,
                                selectedDate, instance.settings);
                        dates.not(this).datepicker("option", option, date);
                    }
                });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the jQuery datepicker where I have two textboxes (start date / end
I am using the jQuery datepicker to request date input from the user. I
I have added the JQuery Datepicker control to one of my ASP.Net pages. The
Hi i am using jquery-ui datepicker to select date and date.js to find difference
I'm using a jQuery datepicker to select an applicant's date of birth, but the
I am using the date picker provided by jQuery UI to select a date
I am using the datepicker which renders incorrectly on my webpage. The date rows
I am using the vanilla datepicker in Silverlight 2. I bind the selected date
I'm using ui.datepicker.js and I want to validate the date field to make sure
i'm using jquery in report section in my asp.net mvc project.But i had problem

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.