Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. need help: validation of date

need help: validation of date

Scheduled Pinned Locked Moved ASP.NET
sysadminhelpquestion
11 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    neodeaths
    wrote on last edited by
    #1

    <asp:Label ID="Label2" runat="server" BorderStyle="None" Width="80px" Text="date:" /> <asp:TextBox ID="txtdate" runat="server" />   <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtdate" ErrorMessage="Required." /> <br /> the above code is field validator. is there a function to make sure the entered date is today and days after?(any time after today)

    S N K 3 Replies Last reply
    0
    • N neodeaths

      <asp:Label ID="Label2" runat="server" BorderStyle="None" Width="80px" Text="date:" /> <asp:TextBox ID="txtdate" runat="server" />   <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtdate" ErrorMessage="Required." /> <br /> the above code is field validator. is there a function to make sure the entered date is today and days after?(any time after today)

      S Offline
      S Offline
      Sathesh Sakthivel
      wrote on last edited by
      #2

      Try with Javascript for the Date Validation.

      Regards, Satips.

      1 Reply Last reply
      0
      • N neodeaths

        <asp:Label ID="Label2" runat="server" BorderStyle="None" Width="80px" Text="date:" /> <asp:TextBox ID="txtdate" runat="server" />   <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtdate" ErrorMessage="Required." /> <br /> the above code is field validator. is there a function to make sure the entered date is today and days after?(any time after today)

        N Offline
        N Offline
        Not Active
        wrote on last edited by
        #3

        You could use a CustomValidator control and supply either a Javascript or Serve-Side method, or both.


        only two letters away from being an asset

        N 1 Reply Last reply
        0
        • N neodeaths

          <asp:Label ID="Label2" runat="server" BorderStyle="None" Width="80px" Text="date:" /> <asp:TextBox ID="txtdate" runat="server" />   <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtdate" ErrorMessage="Required." /> <br /> the above code is field validator. is there a function to make sure the entered date is today and days after?(any time after today)

          K Offline
          K Offline
          Kunal P
          wrote on last edited by
          #4

          use a date time picker control.. that`ll save u the burden of validating the date..

          Kunal

          N 2 Replies Last reply
          0
          • K Kunal P

            use a date time picker control.. that`ll save u the burden of validating the date..

            Kunal

            N Offline
            N Offline
            neodeaths
            wrote on last edited by
            #5

            and the date time picker i can define the user to select only dates that are after today am i rite?

            K 1 Reply Last reply
            0
            • N neodeaths

              and the date time picker i can define the user to select only dates that are after today am i rite?

              K Offline
              K Offline
              Kunal P
              wrote on last edited by
              #6

              obv not.. u can select from the dates before today.. infact, 5-7 yrs back as well..

              Kunal

              1 Reply Last reply
              0
              • K Kunal P

                use a date time picker control.. that`ll save u the burden of validating the date..

                Kunal

                N Offline
                N Offline
                neodeaths
                wrote on last edited by
                #7

                and where can i find my date time control? i can see it in the toolbar >><

                K 1 Reply Last reply
                0
                • N neodeaths

                  and where can i find my date time control? i can see it in the toolbar >><

                  K Offline
                  K Offline
                  Kunal P
                  wrote on last edited by
                  #8

                  well.. there wudnt be ny in the tool bar..:laugh:... u got to download it from the net.. go to ajax.asp.net to download the toolkit.. which has the same.. or any other third party asp.net date time picker control.. i have one.. as well.. built in javascript.. shud i mail you..

                  Kunal

                  N 1 Reply Last reply
                  0
                  • K Kunal P

                    well.. there wudnt be ny in the tool bar..:laugh:... u got to download it from the net.. go to ajax.asp.net to download the toolkit.. which has the same.. or any other third party asp.net date time picker control.. i have one.. as well.. built in javascript.. shud i mail you..

                    Kunal

                    N Offline
                    N Offline
                    neodeaths
                    wrote on last edited by
                    #9

                    yes pls and thx in advance

                    1 Reply Last reply
                    0
                    • N Not Active

                      You could use a CustomValidator control and supply either a Javascript or Serve-Side method, or both.


                      only two letters away from being an asset

                      N Offline
                      N Offline
                      neodeaths
                      wrote on last edited by
                      #10

                      how would i do that?

                      N 1 Reply Last reply
                      0
                      • N neodeaths

                        how would i do that?

                        N Offline
                        N Offline
                        Not Active
                        wrote on last edited by
                        #11

                        RTFM


                        only two letters away from being an asset

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups