立即注册 登录
FineUI 官方论坛 返回首页

zy32002的个人空间 https://www.fineui.com/BBS/?4122 [收藏] [复制] [RSS]

日志

my97整合fineui例子,开始和结束时间

已有 2145 次阅读2015-11-28 16:10 |个人分类:Fineui 分享


<f: Toolbar runat ="server">
                            <Items>
                                <f: TriggerBox ID ="tb_btime"  Label ="开始日期" EmptyText="请选择开始日期" TriggerIcon="Date"
                                    runat="server">
                                </f: TriggerBox>

                                <f: TriggerBox ID ="tb_etime"  Label ="结束日期" EmptyText="请选择结束日期" TriggerIcon="Date"
                                    runat="server">
                                </f: TriggerBox>
                            </Items>
                        </f: Toolbar>


<script src="../../res/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
    var btimeClientID = '<%= tb_btime.ClientID %> ';
    var etimeClientID = '<%= tb_etime.ClientID %> ';
    F.ready(function () {

        var btime1 = F(btimeClientID);
        var etime2 = F(etimeClientID);

        btime1.onTriggerClick = function () {
            WdatePicker({
               skin: 'ext', //ext皮肤
                el: btimeClientID + '-inputEl',
                dateFmt: 'yyyy-MM-dd',
                maxDate: '%y-%M-%d'
                //,onpicked: function () {
                //    // 确认选择后,执行触发器输入框的客户端验证(必填验证)
                //    //etime2.validate();
                //}
            });
        };

        etime2.onTriggerClick = function (){
            var btimeData = btime1.getValue();
            if (btimeData.length == 0) {
                etime2.setValue( "");
                alert( "请先选择开始日期!" );
                return;
            }
            //alert(btimeData);
                //return;
           
            WdatePicker({
                el: etimeClientID + '-inputEl',
                dateFmt: 'yyyy-MM-dd',
                minDate: btimeData,
                maxDate: '%y-%M-%d'//今天
            });
        };

    });
</script>

路过

鸡蛋

鲜花

握手

雷人

评论 (0 个评论)

小黑屋|手机版|FineUI 官方论坛 ( 皖ICP备13005369号-1 )

GMT+8, 2020-1-26 08:43 , Processed in 0.099292 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

返回顶部