doubi6898 2015-02-05 03:43
浏览 26

Yii 1.1时间下拉列表

I have searched other dependent drop down list problems and I tried them but just don't work for me. In my case, the first drop down is a list of start times (i.e 7:00, 8:00 and so on until 10:00) and the second one is a list of end times (16:00 to 19:00). If I choose a Start Time of 7:00, 9 hours will automatically be added to it and the result will be displayed on the End Time drop down, so that'll be 16:00.

Here is my VIEW

This is my Start Time drop down:

<label class="col-lg-2 form-label"><b>Start Time</b></label>
<div class="col-lg-4" >
    <?php 
        echo $form->dropDownList($details, 'time_from', FWA::getTimeFrom(), array('class' => 'form-control')) 
    ?>
</div>

This is my End Time drop down:

<label class="col-lg-2 form-label"><b>End Time</b></label>
<div class="col-lg-4" >                            
    <?php 
        echo $form->dropDownList($details, 'time_to', FWA::getTimeTo(), array('class' => 'form-control', 'id' => 'EndTimeID')) 
    ?>         
</div>

My CONTROLLER is kind of complicated and is also confidential. All I could say is that I don't have a separate controller for both Start and End Time. Its codes are just placed inside the public function actionCreate() in my FWController.php

I hope somebody can help me through this.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 GDI处理通道视频时总是带有白色锯齿
    • ¥20 用雷电模拟器安装百达屋apk一直闪退
    • ¥15 算能科技20240506咨询(拒绝大模型回答)
    • ¥15 自适应 AR 模型 参数估计Matlab程序
    • ¥100 角动量包络面如何用MATLAB绘制
    • ¥15 merge函数占用内存过大
    • ¥15 Revit2020下载问题
    • ¥15 使用EMD去噪处理RML2016数据集时候的原理
    • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
    • ¥15 单片机无法进入HAL_TIM_PWM_PulseFinishedCallback回调函数