JSF JQUERY 使用datepicker
不推荐使用。可以用primefaces的p:Calendar替代,更换控制使用。
简单使用jquery的datepicker示例:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Datepicker - Default functionality</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css"> <script>
$(function() { $("[id='reg:datepicker1']").datepicker();
$( "#datepicker" ).datepicker();
}); </script>
</head>
<body> <p>Date: <input type="text" id="reg:datepicker1"></p>
<p>Date: <input type="text" id="datepicker"></p> </body>
</html>
在jsf中,可以这样写:
<h:inputText id="datepicker1"></h:inputText>
<p>Date: <input type="text" id="datepicker"/></p>
但是datepicker1会被自动加上reg:datepicker1,这样script更改为:
<script>
$(function() {
$("[id='reg:datepicker1']").datepicker();
$( "#datepicker" ).datepicker();
//$( "#reg:datepicker1" ).datepicker();
});
</script>
一定要放在jquery link的后面。
JSF JQUERY 使用datepicker的更多相关文章
- jQuery UI Datepicker使用介绍
本博客使用Markdown编辑器编写 在企业级web开发过程中,日历控件和图表控件是使用最多的2中第三方组件.jQuery UI带的Datepicker,日历控件能满足大多数场景开发需要.本文就主要讨 ...
- jQuery Mobile Datepicker 使用
插件引入文件: <meta name="viewport" content="width=device-width, initial-scale=1"&g ...
- jquery UI datepicker时间控件的使用
参考: http://api.jqueryui.com/datepicker/#method-show 英文 http://www.helloweba.com/view-blog-168.html 中 ...
- jQuery ui datepicker 日历转中文
做个笔记,以后详解 jQuery(function($){ $.datepicker.regional['zh-CN'] = { closeText: '关闭', prevText: '<上月' ...
- jquery日历datepicker的使用方法
jquery.ui.datepicker.js 用法: http://blog.csdn.net/zb0567/article/details/7906238 原文 http://blog.cs ...
- jQuery UI Datepicker&Datetimepicker添加 时-分-秒 并且,判断
jQuery UI Datepicker时间(年-月-日) 相关代码: <input type="text" value="" name="ad ...
- JQuery UI datepicker 使用方法(转)
官方地址:http://docs.jquery.com/UI/Datepicker,官方示例: http://jqueryui.com/demos/datepicker/. 一个不错的地址,用来DIY ...
- 页面日期选择控件--jquery ui datepicker 插件
日期选择插件Datepicker是一个配置灵活的插件,我们可以自定义其展示方式,包括日期格式.语言.限制选择日期范围.添加相关按钮以及其它导航等.官方地址:http://docs.jquery.com ...
- 坑爹的jquery ui datepicker
1.坑爹的jquery ui datepicker 竟然不支持选取时分秒,害的我Format半天 期间尝试了bootstrap的ditepicker,但是不起作用,发现被jquery ui 覆盖了, ...
随机推荐
- 与Python Falling In Love_Python跨台阶(面向对象)
第二课会介绍Python中的一些变量的使用.列表.元组.字典等一些详细内容...篇幅会比较多...因此在整理中... 先跳过第二课...直接来第三课..Python中面向对象的学习以及与mysql数据 ...
- jQuery操作单选按钮(radio)用法
1.获取选中值,四种方法都可以: $('input:radio:checked').val():$("input[type='radio']:checked").val(); $( ...
- 你了解javascript中的function吗?(1)
上一篇文章中 介绍了function在javascirpt作为一等公民所担任的重要责任,在不同 的上下文中它担任着不同的角色,在对象内部它可以是函数,同时又能充当名字空间,不仅如此所有的functio ...
- js的几种排序
转载:http://www.jb51.net/article/81520.htm 一.冒泡排序 ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ...
- 51单片机中断interrupt……using……
51单片机中断细节的一些问题. interrupt0:外部中断0interrupt1:定时器中断0interrupt2:外部中断interrupt3:定时器中断1interrupt4:串口 using ...
- 把时间转成适合符合日常习惯的格式【js】
假设现在是7月30日12点,我们可以说今天12点,意思也非常明确. 我们习惯说昨天12点,而不习惯说29号12点. 我们习惯说周一12点,而不习惯说28号12点,这样不用翻日历看今天是几号. so,上 ...
- ViewHolder数据错乱BUG
需求是这样的,在列表中用一个图标标示某个item是已经被接下或者完成的任务. 对于文件有这样的操作,进入列表后第一页面展示正常,但是加载更多后同样位置出现了同样的标志.这不是我想要的效果 我的解决办法 ...
- AndroidPn
客户端的主要包说明 org.androidpn.client包下的文件 public class Constants { //包含静态数据 public class InvalidFormatExc ...
- tomcat提示警告: An attempt was made to authenticate the locked user"tomcat"
启动tomcat7之后,运行正常,但是运行一段时间就会提示以下警告: 十二月 04, 2013 5:10:15 下午 org.apache.catalina.realm.LockOutRealm au ...
- git初体验(六)git配置
一.基本配置 看这篇Git 基本配置其实就解决很多问题了. 二.客户端配置 1.git bash 粘贴与编辑 在git bash客户端头部右键,现在属性,然后把"快速编辑模式勾选即可&quo ...