Date placeholder

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • axapta

    Date placeholder

    Hi
    I need the input of a text field to be as dd/mm/yyyy how can I achieve this?

    Regards

  • rowe_newsgroups

    #2
    Re: Date placeholder

    On Jul 4, 7:06 am, "axapta" <jas.jac...@gma il.comwrote:
    Hi
    I need the input of a text field to be as dd/mm/yyyy how can I achieve this?
    >
    Regards
    Simple:

    Don't allow the user to directly enter text into the text box and give
    them a calender control to pick the date from.

    Thanks,

    Seth Rowe [MVP]

    Comment

    • Miro

      #3
      Re: Date placeholder

      If you really wanted to use a textbox,

      could you not use a formatted box and then validate the numbers against a
      date command.
      If the date command works - its a valid date. If not - its not.

      Miro

      "axapta" <jas.jackie@gma il.comwrote in message
      news:A025D738-CBF7-4430-93DF-CC4EA9C5872C@mi crosoft.com...
      Hi
      I need the input of a text field to be as dd/mm/yyyy how can I achieve
      this?
      >
      Regards

      Comment

      • Family Tree Mike

        #4
        Re: Date placeholder

        A MaskedTextBox or a DateTimePicker support this. You just need to set the
        appropriate formatting options on each.

        "axapta" <jas.jackie@gma il.comwrote in message
        news:A025D738-CBF7-4430-93DF-CC4EA9C5872C@mi crosoft.com...
        Hi
        I need the input of a text field to be as dd/mm/yyyy how can I achieve
        this?
        >
        Regards

        Comment

        • Cor Ligthert[MVP]

          #5
          Re: Date placeholder

          Axapta,

          A web textbox or a windows form textbox, because the approach to that can be
          different?

          Cor

          "axapta" <jas.jackie@gma il.comschreef in bericht
          news:A025D738-CBF7-4430-93DF-CC4EA9C5872C@mi crosoft.com...
          Hi
          I need the input of a text field to be as dd/mm/yyyy how can I achieve
          this?
          >
          Regards

          Comment

          • axapta

            #6
            Re: Date placeholder

            OK, I implemented a calendar control. The problem seems to be in
            configuration.
            If I enter 07/06/2005 as a date, the results returned by the SQL SP are
            records which match 06/07/2005.

            I've set the language to British on the SQL Server ...

            "Cor Ligthert[MVP]" <notmyfirstname @planet.nlwrote in message
            news:A0CAEFA7-BF35-4F93-BD36-863758A9F458@mi crosoft.com...
            Axapta,
            >
            A web textbox or a windows form textbox, because the approach to that can
            be different?
            >
            Cor
            >
            "axapta" <jas.jackie@gma il.comschreef in bericht
            news:A025D738-CBF7-4430-93DF-CC4EA9C5872C@mi crosoft.com...
            >Hi
            >I need the input of a text field to be as dd/mm/yyyy how can I achieve
            >this?
            >>
            >Regards
            >

            Comment

            • Cor Ligthert[MVP]

              #7
              Re: Date placeholder

              Axapta,

              But what is on your your client? As SQL server simple returns a DateTime,
              independent from the setting on the Server.

              I assume that you use parameters to select that.



              Cor

              "axapta" <jas.jackie@gma il.comschreef in bericht
              news:%23tf0Gjf3 IHA.5060@TK2MSF TNGP02.phx.gbl. ..
              OK, I implemented a calendar control. The problem seems to be in
              configuration.
              If I enter 07/06/2005 as a date, the results returned by the SQL SP are
              records which match 06/07/2005.
              >
              I've set the language to British on the SQL Server ...
              >
              "Cor Ligthert[MVP]" <notmyfirstname @planet.nlwrote in message
              news:A0CAEFA7-BF35-4F93-BD36-863758A9F458@mi crosoft.com...
              >Axapta,
              >>
              >A web textbox or a windows form textbox, because the approach to that can
              >be different?
              >>
              >Cor
              >>
              >"axapta" <jas.jackie@gma il.comschreef in bericht
              >news:A025D73 8-CBF7-4430-93DF-CC4EA9C5872C@mi crosoft.com...
              >>Hi
              >>I need the input of a text field to be as dd/mm/yyyy how can I achieve
              >>this?
              >>>
              >>Regards
              >>
              >

              Comment

              • Herfried K. Wagner [MVP]

                #8
                Re: Date placeholder

                "axapta" <jas.jackie@gma il.comschrieb:
                I need the input of a text field to be as dd/mm/yyyy how can I achieve
                this?
                In addition to the other replies: Note that different countries, languages,
                and cultures use different date and time formats. Thus it does not make
                much sense to tie the user to a certain date format which he is maybe not
                familiar to.

                --
                M S Herfried K. Wagner
                M V P <URL:http://dotnet.mvps.org/>
                V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

                Comment

                Working...