0

尝试使用 jquery 、 Framework7 和 mobipick 实现自定义日期选择器。

在 Html 文件中使用以下文件:

<head>
<link rel="stylesheet" href="../css/framework7.css">
<link href="../css/mobipick.css" rel="stylesheet">
<script type="text/javascript" src="../js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="../js/xdate.js"></script>
<script type="text/javascript" src="../js/xdate.i18n.js"></script> 
<script type="text/javascript" src="../js/mobipick.js"></script>
<script type="text/javascript" src="../js/framework7.js"></script> 
</head>
<body>
<input id="r_dob" type="text" ></input>
</body>

并在 Js 文件中:

jQuery(function($){
    alert('Picker');
    var picker = $( "input[type='text']", this );
    //var picker = $( "#r_dob" );
    picker.mobipick({});
    picker.bind( "change", function() {
        var date = $( this ).val();
        // formatted date
        var dateObject = $( this ).mobipick( "option", "date" );
    });
});

得到这个错误picker.mobipick({}); that object has no method mobipick

请帮忙。

4

0 回答 0