Coder Social home page Coder Social logo

northwalker / vue-hotel-datepicker Goto Github PK

View Code? Open in Web Editor NEW
85.0 5.0 27.0 3.44 MB

A Vue.js date range picker component without other dependencies for hotels and multi-purpose.

Home Page: https://northwalker.github.io/vue-hotel-datepicker/

License: MIT License

JavaScript 7.55% Vue 89.10% HTML 3.36%
vue datepicker date-range-picker hotel-datepicker

vue-hotel-datepicker's Introduction

Hi there ๐Ÿ‘‹

่ฝŸ้š†้š†้š†๐Ÿคฃ๐Ÿคฃ้š†้š†้š†้š†่ก่ก่ก่ก๐Ÿ˜๐Ÿ˜๐Ÿ˜ๆ‹‰้ขจ๐Ÿ˜Ž๐Ÿ˜Ž๐Ÿ˜Žๅผ•ๆ“Ž็™ผๅ‹•๐Ÿ”‘๐Ÿ”‘๐Ÿ”‘ๅผ•ๆ“Ž็™ผๅ‹•+๐Ÿš—+๐Ÿ‘‰+๐Ÿš— ้ขจ ๐Ÿ’จ๐Ÿ’จ ๅนๅ‹•ๆฏไธ€ๅ€‹ๆฏ›ๅญ”๐Ÿ‘ฉ๐Ÿฆฒ๐Ÿง” ๆˆ‘ๆ˜ฏไปŠๅคœ๐ŸŒ™๐ŸŒ™ ๆœ€๐Ÿ˜Ž ็จ€ๆœ‰็š„ๅ“็จฎ๐Ÿค“๐Ÿค“ ่ฎ“๐Ÿ˜ฏ ็œ‹ๅˆฐ็š„ไบบไปฅ็‚บๆ˜ฏๅคข๐Ÿ˜ฑ๐Ÿ˜ฑ ้‚„ๆฒ’้†’ไพ†๐Ÿ˜ด๐Ÿ˜ด ๅฐฑๅทฒ็ถ“็„กๅฝฑ็„ก่นค๐Ÿ‘ป๐Ÿ‘ป ้ขจ ๐Ÿ’จ๐Ÿ’จ ๆ•ฒ้†’ๆฏไธ€ๅ€‹้ขๅญ”๐Ÿ˜ฒ๐Ÿ˜ฒ ๆˆ‘ๆ˜ฏๆ˜Žๅคฉ๐Ÿค™๐Ÿค™ ่ขซ ่ดŠๅ˜†็š„้ฉšๆ‚š๐Ÿ˜ต๐Ÿ˜ต ่ฎ“๐Ÿ˜จ๐Ÿ˜จ ็œ‹ๅˆฐ็š„ไบบๅ…จ้ƒจๆ„Ÿๅ‹•๐Ÿ˜ญ๐Ÿ˜ญ 0โƒฃๅˆฐ๐Ÿ’ฏK only 4โƒฃ็ง’้˜๐Ÿ˜๐Ÿ˜ ็ด…็‡ˆๅœ ็ถ ็‡ˆ่กŒ๐Ÿšฅ๐Ÿšฅ ็œ‹ๅˆฐ่กŒไบบ่ฆ็•ถๅฟƒ๐Ÿšถโ™€๐Ÿšถโ™€ ๅฟซ่ปŠ้“ ๆ…ข่ปŠ้“๐Ÿ˜ˆ๐Ÿ˜ˆ ๅนณๅฎ‰ๅ›žๅฎถๆ‰ๆ˜ฏ็Ž‹้“ ๐Ÿ’ช๐Ÿ’ช ้–‹่ปŠ๐Ÿš—๐Ÿš—ไธๆ˜ฏ้จŽ่ปŠ๐Ÿ๐Ÿไธๆ€•ๆฒ’ๆˆดๅฎ‰ๅ…จๅธฝ๐Ÿ‘ฒ๐Ÿ‘ฒๅชๆ€•่ญฆๅฏŸ๐Ÿ‘ฎโ™‚๐Ÿ‘ฎโ™‚BI BI BI ๅซๆˆ‘่ทฏ้‚Š้  ๐Ÿ˜ฉ๐Ÿ˜ฉ BI BI BI BI BI ๅคง็‡ˆๅฟ˜ไบ†้–‹๐Ÿ˜๐Ÿ˜ BI BI BI BI BI ้ง•็…งๆฒ’ๆœ‰ๅธถ ๐Ÿคซ๐Ÿคซ BI BI BI BI BI ๅทๅท่ฌ›้›ป่ฉฑ๐Ÿ˜Ž๐Ÿ˜Ž BI BI BI BI BI ๆฒ’็นซๅฎ‰ๅ…จๅธถ ๐Ÿ˜ฌ๐Ÿ˜ฌ ๆˆ‘็š„ๅคขๅนป่ปŠๅญ๐Ÿš—๐Ÿš—ๅฐฑๆ˜ฏๆœ€่พฃ๐ŸŒถ๐ŸŒถ็š„็พŽๅฅณ๐Ÿ‘ธ๐Ÿ‘ธ ๆœ‰ๅฅน้™ชไผด๐Ÿ˜๐Ÿ˜ๅ“ชๆ€•่ปŠไธŠๅชๆœ‰ๆ”ถ้ŸณๆฉŸ ๐Ÿ“ป๐Ÿ“ป ๆˆ‘ๅฐฑๅƒ้šป้‡Ž็‹ผ๐Ÿบ๐Ÿบ่บซไธŠๆŠซ่‘—็พŠ๐Ÿ‘๐Ÿ‘็š„็šฎ ๆˆ‘็š„ๅฟƒๆƒ…๐Ÿคช๐Ÿคชๅฅฝๆฏ”้–‹่‘—ไธ€ๆžถๆˆฐ้ฌฅๆฉŸ๐Ÿ›ฉ๐Ÿ›ฉ

vue-hotel-datepicker's People

Contributors

northwalker avatar tobiasj 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  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  avatar  avatar

vue-hotel-datepicker's Issues

previous arrow not visible if minDate from previous month but startDate not specified

Hi! Thank you so much for this component! ๐Ÿ˜„ I was trying this component out, and I found that if we specify a previous month minDate and some future maxDate as props, the previous month arrow is not visible to navigate to a previous date. However, if we specify minDate, maxDate, startDate as well as endDate making sure that the startDate lies in a previous month, then only the previous month arrow is visible. It will create an issue for users to select a previous month start date in cases where there is no default date range initialized.

So I checked the code and it seems, there is a function called disabledPreviousArrow that decides whether 'disabled' class is to be added for the previous-arrow. The decision there takes place based on startDate, but I guess it should also depend on minDate. In cases where startDate is not specified but a minDate from a previous month is specified, 'disabled' class should not be added.

Dynamic minNight

Hi,

Is there an event triggered on months change?
I would need to set MinNight only for selected months?

Any idea on how I could get this done please?

Best regards

add @open event

priority

Can you add @OPEN event, so that on opening datepicker popup I can add my script.

Usage

My usage is to add input field for inputing time & date.
On opening popup, I have added script to append those input fields in .vhd-calendar-left & .vhd-calendar-right

Issue when closing calendar on mobile

Hello,

Using Desktop, it's OK, when I select arrival date, and close the calendar to reopen it nothing changes.

But using mobile, when I close calendar, the dates somehow resets and I can select dates that I should not be able to select.

To illustrate this:

First calendar opening is OK

Capture dโ€™eฬcran 2023-03-16 aฬ€ 12 36 42

If I select March 26th I can't select departure as 26th can't be an arrival day (by the way, half days do not have specific css class to show if it's just an arrival open date or departure open date).

Capture dโ€™eฬcran 2023-03-16 aฬ€ 12 37 14

If I close the calendar to reopen it arrival date is still selected but all other dates reappear which allows the user tu select March 28th for departure which leads to double / overlapping bookings.

Capture dโ€™eฬcran 2023-03-16 aฬ€ 12 37 54

Capture dโ€™eฬcran 2023-03-16 aฬ€ 12 45 02

This is only happening on mobile layout.
Any idea on how to solve this?
Is an event triggered on close only on mobile?

Max night issue

<VueHotelDatepicker :ref="datepickerId" :datepickerd="datepickerId" :selectForward="selectForward" :maxNights="maxNights" v-on:update="getDate($event)"
format="MM-DD-YYYY" :placeholder="placeholder"

is there anything wrong?

peerDependencies for vue?

Hi,

Thank you for maintaining this great component. There are not a lot to choose from for this use case.

Reviewing the v2.0.0 I noticed you declared vue in the dependencies section of packages.json. Shouldn't it be declared in the peerDependencies section?

Localization support

Hi,

Could we have some doc on localization support please?
I can't manage to translate my datepicker.

Got error using typescript

Hello and thanks for the amazing component.

When i try to import it in a Vue Typescript project, I encounter this error.

37:32 Could not find a declaration file for module '@northwalker/vue-hotel-datepicker'. '/your/project/root/node_modules/@northwalker/vue-hotel-datepicker/lib/vue-hotel-datepicker.umd.js' implicitly has an 'any' type.
  Try `npm install @types/northwalker__vue-hotel-datepicker` if it exists or add a new declaration (.d.ts) file containing `declare module '@northwalker/vue-hotel-datepicker';

Can you please fix this?

Thanks again โค๏ธ

onfocus event not supported

From an UI point of view it would be awesome to support tab enter like events

IMHO a very simple solution is to treat the @focus event as a click.

Do you have any solution to do that from a prop point of view?

Found some issues

Hello there!

First of all, nice component!
I've found 2 issues related to the documentation vs. real implementation:

Prop 'separator' have a typo. The documentation states it is 'separator' but it is implementated as 'seperator'.
The documentation states this two properties 'maxNights' and 'minNights' ending with the letter 's'. It seems it's implementated without the 's' as 'maxNight' and 'minNight'.

I also found another little bug. If you set your min date to the first day of 2019, for example, the control disable the 'previous arrow' for every start of year.

Best regards!

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.