feat: calendar block out weekends

Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>
This commit is contained in:
Ameya Shenoy 2021-02-14 14:01:30 +05:30
parent 54e885c524
commit 53ed1a7057
Signed by: codingcoffee
GPG key ID: F7D58AAC5DACF8D3

View file

@ -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'