kesarion / angular2-air-datepicker

Angular2 Datepicker | Native implementation of air-datepicker
http://t1m0n.name/air-datepicker/docs/
MIT License
16 stars 10 forks source link

Fix: check in sameDate function, add check on same hour and minutes #31

Closed iliakg closed 2 years ago

iliakg commented 4 years ago

I'v got a bug with time range, when I change hours or minutes, the airChange emit changes half the time. At first send Date and next change send undefined

codecov-io commented 4 years ago

Codecov Report

Merging #31 into master will decrease coverage by 0.43%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #31      +/-   ##
==========================================
- Coverage   78.35%   77.92%   -0.44%     
==========================================
  Files          11       11              
  Lines         231      231              
  Branches       42       42              
==========================================
- Hits          181      180       -1     
  Misses         40       40              
- Partials       10       11       +1     
Impacted Files Coverage Δ
src/lib/classes/options.ts 100.00% <ø> (ø)
src/lib/classes/calendar.ts 95.40% <0.00%> (-1.15%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b02ce17...0e2304a. Read the comment docs.

kesarion commented 4 years ago

@iliakg Why are you using the range option with timepicker? 🤔

I mean, I thought of disabling the timepicker option when range is selected, since it didn't make sense with just one timepicker (two might work, but it starts getting ugly).

I don't currently see these two options as being compatible with each other. Perhaps I'll get back to it at some point and see if this change doesn't break anything. I would need to create the tests for the range option... which I haven't done as you can see from the coverage report.

For the time being, I'm afraid you'll have to use your own fork/build if this change is useful to you.