<div class="form-group"> <?php echo $form->field($model2, 'tgl_mulai')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Tanggal Keberangkatan'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-m-d']])->label('Tangal Keberangkatan'); ?> </div> <div class="form-group"> <?php $data9 = ArrayHelper::map(\common\models\Pegawai::find()->asArray()->all(), 'nip', 'nama_cetak'); echo $form->field($model, 'pejabat')->widget(Select2::classname(), ['data' => $data9, 'options' => ['id' => 'data2', 'placeholder' => 'Pilih Pejabat Memberi Tugas'], 'pluginOptions' => ['allowClear' => true]])->label('Pilih Pejabat Memberi Tugas'); ?> </div> <div class="form-group"> <?php $data2 = ArrayHelper::map(\common\models\Angkutan::find()->asArray()->all(), 'angkutan_id', 'nama'); echo $form->field($model, 'angkutan')->widget(Select2::classname(), ['data' => $data2, 'options' => ['placeholder' => 'Pilih Angkutan'], 'pluginOptions' => ['allowClear' => true]])->label('Pilih Angkutan'); ?> </div> </div> <div class="col-md-6"> <div class="form-group"> <?php echo $form->field($model2, 'tgl_selesai')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Tanggal Kembali'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-m-d']])->label('Tangal Kembali'); ?> </div> <div class="form-group"> <?php echo $form->field($model, 'tgl_penugasan')->widget(DatePicker::classname(), ['options' => ['id' => 'tglsp', 'require' => true, 'placeholder' => 'Tanggal Penugasan'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-m-d']])->label('Tanggl Penugasan');
public function Angkutan($id) { $gole = \common\models\Angkutan::find()->where(['angkutan_id' => $id])->one(); return $gole->nama; }
public function getKend() { return $this->hasOne(\common\models\Angkutan::className(), ['angkutan_id' => 'angkutan']); }