how to remove time from an html field |
how to remove time from an html field |
bobk |
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 |
CharlesEF |
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?
|
Christian J |
Jul 12 2018, 05:23 PM
Post
#3
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
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. |
pandy |
Jul 12 2018, 05:35 PM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 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. |
Lo-Fi Version | Time is now: 23rd April 2024 - 03:49 PM |