首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Timepicker无法处理日历模式弹出窗口

问Timepicker无法处理日历模式弹出窗口
EN

Stack Overflow用户
提问于 2014-04-18 12:55:36
回答 1查看 1.3K关注 0票数 1

我正在尝试通过单击“添加事件”按钮在完整日历上添加一个带有时间安排的事件。但是“时间选择器”在日历模式弹出框中不起作用。

我尝试使用以下代码:

在calendar_show.js中

代码语言:javascript
复制
// Function to quickModal
function quickModal(start, end, allDay)
{   
    $('#cal_quickSaveModal').modal('show');
    $(".modal-header").html('<div id="event_title"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><label>Title : </label><input name="title" type="text" class="input-title form-control"></div>');
    $(".modal-body").html('<form id="event_description"><label>Description : </label><textarea class="input form-control" name="notes"></textarea><label>Start Time : </label><div class="input-group bootstrap-timepicker"><input id="timep1" type="text" name="start" class="form-control timep1"><span class="input-group-addon" style="left: 100px; width: 3px; height: 3px;"><i class="icon-time fa fa-clock-o"></i></span></div><label>End Time : </label><div class="input-group bootstrap-timepicker"><input id="timep2" type="text"  name="end" class="form-control timep2"><span class="input-group-addon" style="left: 100px; width: 3px; height: 3px;"><i class="icon-time fa fa-clock-o"></i></span></div></form>');
    $(".modal-footer").show();
    calendar.start = start;
    calendar.end = end;
    calendar.allDay = allDay;

    // Save button
    $(".modal-footer").delegate('[data-option="quickSave"]','click', function(e) 
    {   
        var event_title = $("div#event_title").find('input').serialize();
        var event_description = $("form#event_description").find("textarea.input").serialize();
        var event_stime = $("form#event_description").find("#timep1").serialize();
        var event_etime = $("form#event_description").find("#timep2").serialize();          
        quickSave(event_title, event_description, calendar.start, calendar.end, event_stime, event_etime);          
        e.preventDefault();

    });

}; // end quickModal

我在calendar.php中被添加了时间选择器

代码语言:javascript
复制
<script src="../common/js/calendar_show.js"></script>
<script type="text/javascript">
    $("#timep1").timepicker();
    $("#timep2").timepicker();
</script>
EN

回答 1

Stack Overflow用户

发布于 2014-06-08 02:41:57

你的时间选择器在没有弹出窗口的情况下工作正常吗?你可能想看看这个讨论- Get Jquery UI Calendar to Show on Top of Modal Popup

您的拾取器没有显示的原因之一是因为弹出对话框具有较高的z索引值。因此,尝试使用picker的z索引值,并给它一个较大的值,比如10000,看看它现在是否可见。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23147594

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档