The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> how to remove time from an html field
bobk
post Jul 12 2018, 11:14 AM
Post #1





Group: Members
Posts: 1
Joined: 27-July 16
Member No.: 24,448



Hello, is there an HTML formatting option that will remove the time field from a datetime value on an HTML row?

For example, i dummied out the "datepicker" below because i just want to show the date without the time, but not show a text box and date selector, just a label and the date and so i tried using the "date-format" utility from the "datepicker" hoping it would allow me to just show the date on a regular HTML display field like below, but the "date-format" utility didn't seem to work

CODE

                <td width="9%" class="lbl-text">Selection Date:</td>
                <td width="16%">
                    <input class="k-textbox" type="text" disabled="disabled" style="border:none" data-bind="value: bipVm.selectionDate" data-format="{0:MM/dd/yyyy}"/>
                </td>

                <!-- <td width="16%">
                    <input data-role="datepicker"
                           class="k-datepicker"
                           style="border:none"
                           data-format="{0:MM/dd/yyyy}"
                           data-bind="enabled: isEmpEnabled, value: bipVm.selectionDate" />
                </td> -->


what is showing on the screen:
Selection Date: 2018-06-06T00:00:00.000
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Jul 12 2018, 03:07 PM
Post #2


Programming Fanatic
********

Group: Members
Posts: 1,981
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



What format do you get the dates in? I mean, is the date you get a date object or a date string?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 12 2018, 05:23 PM
Post #3


.
********

Group: WDG Moderators
Posts: 9,628
Joined: 10-August 06
Member No.: 7



QUOTE(bobk @ Jul 12 2018, 06:14 PM) *

Hello, is there an HTML formatting option that will remove the time field from a datetime value on an HTML row?

Not sure I understand the question. The code example just seems to show a couple of ordinary text fields, with some attribute values that look like Tumblr(?) code. Maybe Tumblr(?) is doing something more with this table row, but it's impossible to say what.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 12 2018, 05:35 PM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Looks like this part formats the date stamp.
CODE
data-format="{0:MM/dd/yyyy}"


MM/dd/yyyy probably gives you (for example) July/12/2018 or 07/12/2018. But the bit before that, (0) looks odd. How did it look before you fiddled with it?

BTW, this isn't HTML. I don't know what it is, but HTML it ain't.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th March 2024 - 09:02 AM