mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add option for display of "time" in addition to date
This commit is contained in:
parent
b00ae67d68
commit
fd02f1b761
@ -42,7 +42,7 @@ function clearEvents(calendar) {
|
||||
* The user-configured setting DATE_DISPLAY_FORMAT determines how the date should be displayed.
|
||||
*/
|
||||
|
||||
function renderDate(date) {
|
||||
function renderDate(date, options={}) {
|
||||
|
||||
if (!date) {
|
||||
return null;
|
||||
@ -50,6 +50,10 @@ function renderDate(date) {
|
||||
|
||||
var fmt = user_settings.DATE_DISPLAY_FORMAT || 'YYYY-MM-DD';
|
||||
|
||||
if (options.showTime) {
|
||||
fmt += ' HH:mm';
|
||||
}
|
||||
|
||||
var m = moment(date);
|
||||
|
||||
if (m.isValid()) {
|
||||
|
@ -2658,7 +2658,7 @@ function loadStockTrackingTable(table, options) {
|
||||
title: '{% trans "Date" %}',
|
||||
sortable: true,
|
||||
formatter: function(value) {
|
||||
return renderDate(value);
|
||||
return renderDate(value, {showTime: true});
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user