DateTimePicker时间控件:_html/css_WEB-ITnose
DateTimePicker 时间控件:
http://xdsoft.net/jqplugins/datetimepicker/
可以参考文档设置各种属性,格式。
用法:
首先下载datetimepicker-master。
1.页面引入css,js文件(注意要放到body之后):
<!-- this should go after your </body> --><link rel="stylesheet" type="text/css" href="/microshop-settlement-server/resources/datetimepicker-master/jquery.datetimepicker.css" /><script src="/microshop-settlement-server/resources/datetimepicker-master/jquery.js"></script><script src="/microshop-settlement-server/resources/datetimepicker-master/build/jquery.datetimepicker.full.min.js"></script>
2.点击文本框弹出日历选项:
Html:
<input id="datetimepicker" type="text" name="createTime" value="<fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss" value="${createTime }"/>" maxlength="20"/>
这里用到了jsp el标签fmt:所以页面要先引入:
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
JavaScript:
<script type="text/javascript"> jQuery('#datetimepicker').datetimepicker({ format:'Y-m-d H:i:s' //这是设置日历格式 });</script>
http://php.net/manual/ru/function.date.php(时间格式可以参考这个,如2009-01-01 10:00:01)
3.目录结构:
4.demo预览:

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.
