如何解决我想以12小时格式在时间选择器中显示时间,但这是基于系统配置的
下面是ejs文件的代码:
html += '<td><input type="date" id="fromDate'+cnt+'" name="fromDate" class="form-control" /></td>';
html += '<td><input type="time" id="fromTime'+cnt+'" name="fromTime" class="form-control" /></td>';
html += '<td><input type="date" id="toDate'+cnt+'" name="toDate" class="form-control" /></td>';
html += '<td><input type="time" id="toTime'+cnt+'" name="toTime" class="form-control" /></td>';
下面是js文件中的代码:
这里我要在数据库中插入值
let fromDateTime = fromDate[i]+'T'+fromTime[i]+':00';
lstcharges.push(fromDateTime[i]);
let toDateTime = toDate[i]+'T'+toTime[i]+':00';
lstcharges.push(toDateTime[i]);
[![在此处输入图片描述] [1]] [1]
这是基于系统配置的时间,我希望它仅以12小时格式显示 [1]:https://i.stack.imgur.com/Pl23g.png
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。