jquery mobile插件mobiscroll的日期控件

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Mobiscroll</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
<!--Includes-->
<link href="css/mobiscroll.custom-2.5.0.min.css" rel="stylesheet" type="text/css" />
<script src="js/mobiscroll.custom-2.5.0.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
  //$('input:jqmData(role="datebox")').mobiscroll().date();
  //初始化日期控件
  var opt = {
  preset: 'date', //日期
  theme: 'android', //皮肤样式,sense-ui,ios,
  display: 'modal', //显示方式
  mode: 'scroller', //日期选择模式
  dateFormat: 'yy-mm-dd', // 日期格式
  setText: '确定', //确认按钮名称
  cancelText: '取消',//取消按钮名籍我
  dateOrder: 'yymmdd', //面板中日期排列格式
  dayText: '日', monthText: '月', yearText: '年', //面板中年月日文字
  endYear:2020 //结束年份
};

  $('input:jqmData(role="datebox")').mobiscroll(opt);

});

</script>
</head>

<body>
<div data-role="page">
<div data-role="header"></div>
<div data-role="content">
  <form id="testfrom">
    日期<input type="text" data-role="datebox" id="txtBirthday" name="txtBirthday" />

  </form>
</div>
<div data-role="footer"></div>
</div>
</body>
</html>

转载于:https://www.cnblogs.com/chengww/p/3504239.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值