diff --git a/apps/assets/templates/assets/asset_create.html b/apps/assets/templates/assets/asset_create.html index 15e75971e..1b5636be5 100644 --- a/apps/assets/templates/assets/asset_create.html +++ b/apps/assets/templates/assets/asset_create.html @@ -137,7 +137,6 @@ $(document).ready(function () { protocolRef.val(protocolShould); protocolRef.trigger("change") } - }) .on("click", ".btn-protocol.btn-del", function () { $(this).parent().parent().remove(); diff --git a/apps/static/js/jumpserver.js b/apps/static/js/jumpserver.js index 352b4a654..a216a1ce0 100644 --- a/apps/static/js/jumpserver.js +++ b/apps/static/js/jumpserver.js @@ -1111,7 +1111,8 @@ function objectAttrsIsBool(obj, attrs) { function formatDateAsCN(d) { var date = new Date(d); - return date.toISOString().replace("T", " ").replace(/\..*/, ""); + var date_s = date.toLocaleString(navigator.language, {hour12: false}); + return date_s.split("/").join('-') } function getUrlParams(url) {