Giter VIP home page Giter VIP logo

vue-horizontal-calendar's Introduction

vue-horizontal-calendar

a horizontal calendar component for Vue.js(only for 2.x) 💻

doc & demos

click here.

install

npm install vue-horizontal-calendar -S

or if you prefer yarn

yarn add vue-horizontal-calendar

local import

<template>
    <div class="demo">
        <vue-horizontal-calendar></vue-horizontal-calendar>
    </div>
</template>

<script>
import VueHorizontalCalendar from 'vue-horizontal-calendar';

export default {
    components: {
        VueHorizontalCalendar
    }
}

</script>

Language

So far, it supports Chinese, English, French, German, Italian , Spanish , Slovak, Czech.

vue-horizontal-calendar's People

Contributors

akashrajum avatar dependabot[bot] avatar elfoslav avatar jacques33 avatar jgalindosl avatar tizianoz93 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vue-horizontal-calendar's Issues

ReferenceError window is not defined

Hi,
steps :
1-c import VueHorizontalCalendar from 'vue-horizontal-calendar'
2- export default { components: { VueHorizontalCalendar },
add it to the template
3- <VueHorizontalCalendar lang="en" />

mac os
project is nuxt.js /vuejs
when refreshing the page it gives an error in the file node_modules/vue-horizontal-calendar/lib/vue-horizontal-calendar.umd.min.js

"ReferenceError
window is not defined"

CDN component

I can not make it work
Can you give me an example? please
thank you

<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>vue-slideout-panel</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css">
    
</head>
<body>

<style>
    
</style>

<div id="app">
    <div class="container mt-4">
        <p class="excample-text">{{choosedDay2.dateFormat}}  星期{{choosedDay2.day}}</p>
        <vue-horizontal-calendar lang="en" choosedDate="2021/08/02" v-on:change="dateChange2"></vue-horizontal-calendar>
    </div>
</div>

<!-- <script src="vue-horizontal-calendar-0.9.0/lib/vue-horizontal-calendar.umd.js"></script> -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/vue-horizontal-calendar.umd.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>


<script>


// Vue.use("vue-horizontal-calendar");

Vue.component("VueHorizontalCalendar", window["vue-horizontal-calendar"]);

var vm = new Vue({
    el: '#app',
    data: {
        choosedDay2: {
            dateFormat: "",
            year: "",
            month: "",
            date: "",
            day: "",
            timestamp: ""
        },
    },
    methods: {
        dateChange2(day) {
          this.choosedDay2 = day;
        },
    }
})
</script>
  

</body>
</html>

_c error

在我使用vite+vue3的环境中,use了该包,放在对应的组件位置上时出现了报错,请问知道这是怎么回事吗?
6A88A20EFFAFD274862F23F4EA472D42
B033259355EAEA7301891007BD8D52D9
D3F0BBADAA39AA2064C25732668AA307
A967FF914DFABBAC4FA19C59590863A0

Multi Language Support

Currently, there is an option of selecting either of two languages, Chinese or English.
Can it also support Portuguese or any other language?

minDate doesn't seem to work with date object

Below is my code

<template>
<vue-horizontal-calendar lang="en" :minDate='tomorrow' swipeSpace="5" choosedItemColor="rgb(249, 197, 46)"></vue-horizontal-calendar>
 {{tomorrow}}
</template>
 data(){
    return{
           tomorrow : new Date(new Date().setDate(new Date().getDate() + 1))
     }
}

Think it should start showing from 24 Fr instead of 23 Th..

But is showing 23 Th as well.

image

Customising the text content inside the picker

Thanks a lot for this nice library.

It will great if we are customise the format of display inside the selection boxes

E.g
3 words for day instead of 2
Showing month date and day instead of day and date only.

Ability to hide the arrows

It will be great if we can hide the arrows when there are no dates for selection before or after the shown range.

Currently I am using it with start date as current date. But with the left arrow shown, the users may think they can select the dates before current date as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.