feat: calendar block out weekends
Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>
This commit is contained in:
parent
54e885c524
commit
53ed1a7057
1 changed files with 5 additions and 0 deletions
|
|
@ -47,6 +47,7 @@
|
|||
<v-date-picker
|
||||
v-model="date"
|
||||
no-title
|
||||
:allowed-dates="allowedDates"
|
||||
v-on:change="populateApiData"
|
||||
@input="datePickerMenu = false"
|
||||
min="2007-01-02"
|
||||
|
|
@ -114,6 +115,10 @@
|
|||
export default {
|
||||
name: 'BhavStock',
|
||||
methods: {
|
||||
allowedDates: val => {
|
||||
var day = new Date(val).getDay();
|
||||
return !(day == 6 || day == 0);
|
||||
},
|
||||
getColor (stock) {
|
||||
if (stock.close_price > stock.open_price) return 'green'
|
||||
else if (stock.close_price == stock.open_price) return 'black'
|
||||
|
|
|
|||
Loading…
Reference in a new issue