我有一个应用程序,我必须提交月度报告和季度报告.我使用bootstrap-datepicker作为月度报告,我想在我的应用程序中保持相同的标准,因此如果我避免使用选择框来显示宿舍会很棒.这是您在月视图模式下提供的引导程序
这就是我想要做的

选择后,将选择该季度的所有3个月.
我检查了bootstrap-datepicker.js文件,我只看到了表生成代码,它是:
DPGlobal.template = '<div class="datepicker">'+
'<div class="datepicker-days">'+
'<table class=" table-condensed">'+
DPGlobal.headTemplate+
'<tbody></tbody>'+
DPGlobal.footTemplate+
'</table>'+
'</div>'+
'<div class="datepicker-months">'+
'<table class="table-condensed">'+
DPGlobal.headTemplate+
DPGlobal.contTemplate+
DPGlobal.footTemplate+
'</table>'+
'</div>'+
'<div class="datepicker-years">'+
'<table class="table-condensed">'+
DPGlobal.headTemplate+
DPGlobal.contTemplate+
DPGlobal.footTemplate+
'</table>'+
'</div>'+
'</div>';
Run Code Online (Sandbox Code Playgroud)
在DPGlobal变量中是模板:
headTemplate: '<thead>'+
'<tr>'+
'<th class="prev">«</th>'+
'<th colspan="5" class="datepicker-switch"></th>'+
'<th class="next">»</th>'+
'</tr>'+
'</thead>',
contTemplate: '<tbody><tr><td colspan="9"></td></tr></tbody>',
footTemplate: '<tfoot>'+
'<tr>'+
'<th colspan="7" class="today"></th>'+
'</tr>'+
'<tr>'+
'<th colspan="7" class="clear"></th>'+
'</tr>'+
'</tfoot>'
Run Code Online (Sandbox Code Playgroud)
所有的帮助表示赞赏
在我的laravel应用中,我正在将变量$ data传递给一个视图,稍后将在另一个视图中包含它。因此,在我的控制器方法中,我有:
public function random($id){
$data = DB::table('reports')->where('id',$id);
return view('partials.data', compact('data'));
}
Run Code Online (Sandbox Code Playgroud)
在partials.data我有:
{!! Form::open(['url'=>'reports/data',$id]) !!}
<table class="table table-responsive table-condensed table-bordered tab-content">
<thead>
<tr>
<th>Month</th>
<th>Value</th>
</tr>
</thead>
<tbody>
@foreach($data as $dat)
<tr>{{$dat->month}}</tr>
<tr>{{$dat->value}}</tr>
@endforeach
</tbody>
</table>
{!! Form::close() !!}
Run Code Online (Sandbox Code Playgroud)
在主视图中,我具有以下功能:
function kpi_values(d) {
// `d` is the original data object for the row
kpi = d.id;
return '@include("reports.data", array("id" => "kpi"))';
}
Run Code Online (Sandbox Code Playgroud)
由以下哪个触发?
$('#monthly_table tbody').on('click', 'td.details-controls', function () {
var tr = $(this).closest('tr');
var row = table.row(tr); …Run Code Online (Sandbox Code Playgroud) 我有一个 Laravel 应用程序,我想将注册的用户限制为仅拥有公司电子邮件的特定目标组。我在我的Registrar.php
public function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|max:255',
'lastname' => 'required|max:255',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|confirmed|min:6',
]);
}
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/
public function create(array $data)
{
$result = null;
$confirmation_code = str_random(30);
$data = array_add($data, 'conf',$confirmation_code);
if(!$data['email'].ends_with(('email'), 'specificdomain.com')){
Flash::message('Welcome ' .$data["name"]. '. Thanks for registering. We have sent you a validation link in your e-mail …Run Code Online (Sandbox Code Playgroud)