简体   繁体   English

Bootstrap日历控件可以显示当前处于活动状态的当前星期?

[英]Bootstrap calendar control to show upto current week in active?

Bootstrap calendar control to show up to current week in active. Bootstrap日历控件可以显示当前处于活动状态的星期。 Any solution would be grateful received. 任何解决方案将不胜感激。

For exampe: consider today is Tuesday, but calendar should up to Sunday in active. 例如:考虑今天是星期二,但是日历应在活动星期日之前进行。 ie last all days & the current week in active? 即过去几天和当前一周处于活动状态?

I'm using php, javascript, jquery and bootstrap. 我正在使用php,javascript,jquery和bootstrap。 I used this function called available: 我使用了这个称为available的函数:

$('#fromdate').datepicker({beforeShowDay: available, dateFormat: 'mm-dd-yy'});

If I get current week and last two week dates. 如果我得到当前星期和最近两个星期的日期。 I will store in to any array and call the function. 我将存储到任何数组中并调用该函数。 So the dates which are in array will be enabled, and the dates which are not in array are disabled. 因此,将启用数组中的日期,而禁用不在数组中的日期。

You could use the minDate option 您可以使用minDate选项

https://jqueryui.com/datepicker/#min-max https://jqueryui.com/datepicker/#min-max

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM