DateTimePicker time control:, datetimepicker Control

Source: Internet
Author: User

DateTimePicker time control:, datetimepicker Control
DateTimePickerTime Control:

Http://xdsoft.net/jqplugins/datetimepicker/

You can refer to the document to set various attributes and formats.

Usage:

First download datetimepicker-master.

1. Introduce css and js files to the page (note that you should put them after the 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. Click the text box to bring up the calendar option:

Html:

<input  id="datetimepicker" type="text" name="createTime" value="<fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss" value="${createTime }"/>" maxlength="20"/>

Here the jsp el label fmt is used: So the page must be introduced first:

<%@ 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' // This is to set the calendar format}); </script>

Http://php.net/manual/ru/function.date.php (time format can refer to this, such as 10:00:01)

3. directory structure:

4. demo preview:

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.