Skip to content
This repository has been archived by the owner. It is now read-only.

select range not giving correct time span #518

Closed
sandeshfromindia opened this Issue Jan 8, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@sandeshfromindia
Copy link

sandeshfromindia commented Jan 8, 2017

with reference to https://mattlewis92.github.io/angular-bootstrap-calendar/#?example=select-range
after selecting time range by dragging result shows incorrect time range.
if their is any patch for this please let me know
thanks

@mattlewis92

This comment has been minimized.

Copy link
Owner

mattlewis92 commented Jan 9, 2017

Sorry but I couldn't reproduce your problem, please could you explain a bit more about what the issue is you're experiencing?

@sandeshfromindia

This comment has been minimized.

Copy link
Author

sandeshfromindia commented Jan 9, 2017

hey Matt,
i was just trying your Select range code on plnkr.co, when i select time range 12 AM to 1 AM of 9 jan 2017 it shows that 'You selected on this day: from "2017-01-08T18:30:00.000Z" to "2017-01-08T19:30:00.000Z" ' in alert-info div as you have shown in Demo https://mattlewis92.github.io/angular-bootstrap-calendar/#?example=select-range
i am using bower version of angular-bootstrap-calendar in my practice project,
But when i downloaded your repo and installed all the dependencies and run the code on npm and tried the same thing and it shows ' You selected on this day: from Sun Jan 01 2017 00:00:00 GMT+0530 to Sun Jan 01 2017 01:00:00 GMT+0530 ' which is correct.
i uploaded some pic for your reference which shows the time range problem.
date select
range select

@mattlewis92

This comment has been minimized.

Copy link
Owner

mattlewis92 commented Jan 9, 2017

Ah, it's because moment objects were being passed instead of date objects and angular wasn't formatting the date to account for the timezone difference i.e. it was rendering the dates in UTC rather than your local timezone. Will cut a new release in a sec with a fix. Thanks for reporting! 😄

@sandeshfromindia

This comment has been minimized.

Copy link
Author

sandeshfromindia commented Jan 9, 2017

ya, that's what i thought of first, cool.. great work Matt, happy to help, Thanks 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.