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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Chance Textmode Date Format

Chance Textmode Date Format

Scheduled Pinned Locked Moved ASP.NET
csharpquestionasp-netvisual-studio
12 Posts 3 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.
  • P Offline
    P Offline
    Praveen Kandari
    wrote on last edited by
    #1

    Hi,
    How can I change the date format of textbox , textmode=date?

    By default its yyyy/mm/dd and I want to change it to mm/dd/yyyy
    asp.net visual studio 2013 framework 4.5

    K Richard DeemingR 2 Replies Last reply
    0
    • P Praveen Kandari

      Hi,
      How can I change the date format of textbox , textmode=date?

      By default its yyyy/mm/dd and I want to change it to mm/dd/yyyy
      asp.net visual studio 2013 framework 4.5

      K Offline
      K Offline
      King Fisher
      wrote on last edited by
      #2

      Do you have any Datepicker on Textbox ?

      நெஞ்சு பொறுக்கு திலையே-இந்த நிலைகெட்ட மனிதரை நினைந்துவிட்டால்

      P 1 Reply Last reply
      0
      • K King Fisher

        Do you have any Datepicker on Textbox ?

        நெஞ்சு பொறுக்கு திலையே-இந்த நிலைகெட்ட மனிதரை நினைந்துவிட்டால்

        P Offline
        P Offline
        Praveen Kandari
        wrote on last edited by
        #3

        No its simple textbox with date as a text mode. but the problem is I can find any option to change the format.

        K 1 Reply Last reply
        0
        • P Praveen Kandari

          No its simple textbox with date as a text mode. but the problem is I can find any option to change the format.

          K Offline
          K Offline
          King Fisher
          wrote on last edited by
          #4

          Then ,How the user Select the Date? by typing?

          நெஞ்சு பொறுக்கு திலையே-இந்த நிலைகெட்ட மனிதரை நினைந்துவிட்டால்

          P 1 Reply Last reply
          0
          • K King Fisher

            Then ,How the user Select the Date? by typing?

            நெஞ்சு பொறுக்கு திலையே-இந்த நிலைகெட்ட மனிதரை நினைந்துவிட்டால்

            P Offline
            P Offline
            Praveen Kandari
            wrote on last edited by
            #5

            Ops sorry I misunderstood your last message. Yes its date picker. but the format is yyyy/mm/dd.

            K 1 Reply Last reply
            0
            • P Praveen Kandari

              Ops sorry I misunderstood your last message. Yes its date picker. but the format is yyyy/mm/dd.

              K Offline
              K Offline
              King Fisher
              wrote on last edited by
              #6

              Is that Ajax Calender or Jquery Calender?

              நெஞ்சு பொறுக்கு திலையே-இந்த நிலைகெட்ட மனிதரை நினைந்துவிட்டால்

              1 Reply Last reply
              0
              • P Praveen Kandari

                Hi,
                How can I change the date format of textbox , textmode=date?

                By default its yyyy/mm/dd and I want to change it to mm/dd/yyyy
                asp.net visual studio 2013 framework 4.5

                Richard DeemingR Offline
                Richard DeemingR Offline
                Richard Deeming
                wrote on last edited by
                #7

                Setting ``TextMode="Date"`` will render an HTML5 date input[^] control. This has limited browser support[^], and doesn't provide any way to override the date format. There are two date formats in play: * The *wire* format, which is how the date is sent to the client, and how it sent back to the server. This is required to be ``yyyy-MM-dd`` in all cases; * The *display* format, which is how the date is presented to the user. This is not part of the specification, so browsers are free to do what they want. Chrome and the latest version of Opera currently use the user's local date settings. Browsers which don't support the date input will fall back to a text input, which means they have to use the wire format. You'll probably want to use a polyfill to get the control working in all browsers. For example:
                https://github.com/chemerisuk/better-dateinput-polyfill[^]


                "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                P 1 Reply Last reply
                0
                • Richard DeemingR Richard Deeming

                  Setting ``TextMode="Date"`` will render an HTML5 date input[^] control. This has limited browser support[^], and doesn't provide any way to override the date format. There are two date formats in play: * The *wire* format, which is how the date is sent to the client, and how it sent back to the server. This is required to be ``yyyy-MM-dd`` in all cases; * The *display* format, which is how the date is presented to the user. This is not part of the specification, so browsers are free to do what they want. Chrome and the latest version of Opera currently use the user's local date settings. Browsers which don't support the date input will fall back to a text input, which means they have to use the wire format. You'll probably want to use a polyfill to get the control working in all browsers. For example:
                  https://github.com/chemerisuk/better-dateinput-polyfill[^]


                  "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                  P Offline
                  P Offline
                  Praveen Kandari
                  wrote on last edited by
                  #8

                  but last time I used the same it was showing mm/dd/yy format.

                  Richard DeemingR 1 Reply Last reply
                  0
                  • P Praveen Kandari

                    but last time I used the same it was showing mm/dd/yy format.

                    Richard DeemingR Offline
                    Richard DeemingR Offline
                    Richard Deeming
                    wrote on last edited by
                    #9

                    Then either you were using a different browser, a different *version* of the browser, or you had different regional settings. The wire format is **always** ``yyyy-MM-dd``. The display format depends entirely on the browser.


                    "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                    "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                    P 1 Reply Last reply
                    0
                    • Richard DeemingR Richard Deeming

                      Then either you were using a different browser, a different *version* of the browser, or you had different regional settings. The wire format is **always** ``yyyy-MM-dd``. The display format depends entirely on the browser.


                      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                      P Offline
                      P Offline
                      Praveen Kandari
                      wrote on last edited by
                      #10

                      No I am using the same browser I don't know whats wrong I will find it out. Thank you for your reply :)

                      Richard DeemingR 1 Reply Last reply
                      0
                      • P Praveen Kandari

                        No I am using the same browser I don't know whats wrong I will find it out. Thank you for your reply :)

                        Richard DeemingR Offline
                        Richard DeemingR Offline
                        Richard Deeming
                        wrote on last edited by
                        #11

                        If it's Chrome, you've probably had several dozen new versions since you saw the mm/dd/yyyy format. :)


                        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                        P 1 Reply Last reply
                        0
                        • Richard DeemingR Richard Deeming

                          If it's Chrome, you've probably had several dozen new versions since you saw the mm/dd/yyyy format. :)


                          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                          P Offline
                          P Offline
                          Praveen Kandari
                          wrote on last edited by
                          #12

                          Yea that can be possible.

                          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