Results 1 to 2 of 2

Thread: Help with TEXT Box type="date"; how to override mm/dd/yyyy

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2018
    Posts
    27

    Help with TEXT Box type="date"; how to override mm/dd/yyyy

    Greetings;

    So I have a Web Form that Allows users to input date time using a asp:text box tag helper.

    After submitting the form a admin can then go back and view the date and time, and change if necessary.


    I am able to properly retrieve previous date from the Server thus far; using a secondary page load.

    My problem is that I want to use the same asp:text type="data" as an input place data from a different page and also use it as a input as well, however
    because the default field is shown as mm/dd/yyyy it is not showing the pre loaded data.


    -Any simple recommendations would help thanks.



    Code:
    <asp:Label ID="Label7" runat="server" CssClass="label"> Date of Placement if known</asp:Label><br /> 
                 <asp:TextBox ID="txtTime"  type ="date" runat="server">
                 </asp:TextBox><br>


    Code:
      Private Sub PageLoad() '
            Dim Item As Generic.List(Of OPS.ListItem.DataItemFind)
    
            For Each oItem As OPS.ListItem.DataItemFind In Item.()
    
    
                Me.txtTime.Text = oItem.txtTime.ToString("MM/dd/yyyy")
                Me.txtTime.Text = oItem.txtTime
    
            Next
        End Sub

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,413

    Re: Help with TEXT Box type="date"; how to override mm/dd/yyyy

    That's an Asp.Net question, and should be in the Asp.Net forum

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width