Arshaw full calendar does not show time properly - angularjs

I am using Arshaw full calendar[Angular bootstrap] in my project, but after implementing it, Whenever I go to the day view and click on the time span say 12.00am, day click event gets fired and if I extract date from the view object I get the same date but the timing shows 05.30.0, That means there is difference of 5.30 hours... Why is this happening, I am using the latest version of master calendar. I am sharing the snapshot of the same. Please help, Thank you..!!!

Related

Fullcalendar time issue

I am using fullcalendar in Salesforce.
There is this custom form created in salesforce in which user enter date and time in custom field which further creates a event in calendar on the specified date from form.
The issue is when I create event using agendaweek it saves the record using form for the specified date and time but when switching to month view and on manually adding the time it saves the event in calendar 5:30 hours behind.
I consoled output
End_Date_time__c":"2021-05-10T06:30:00.000Z","Start_Date_time__c":"2021-05-10T05:30:00.000Z"
I tried solving this issue by changing the timzone using following line which allows me to save as per the requirement but it changes the timezone of agendaweek making it 5:30 hours ahead because of the below specified line.
josnArr[i].start = new Date(josnArr[i].start).toLocaleString(undefined, {timeZone: 'Asia/Kolkata'});
If anyone could please suggest something.This is the form which I have used to create records in calendar.

mattlewis92/angular-bootstrap-calendar calculating Wrong Dates on different Timezone

I am using this calendar https://github.com/mattlewis92/angular-bootstrap-calendar for showing events and time slots for people all over the world. During sign up, every user has to set his timezone and then my application uses this timezone for further date computation rather than client machine timezone.
The problem is that when I make user timezone default using moment.tz.setDefault(timezone) and change the machine's timezone, the calendar calculates dates wrongly.
Here is my excerpt of my code:
moment.tz.setDefault($rootScope.timezone)
vm.calendarView = 'month';
vm.viewDate = moment().startOf('month').toDate();
vm.cellIsOpen = true;
Attached is the screenshot:
[Screenshot]
You can see that user's timezone is currently Asia/Karachi +5 and my machine's timezone is Beijing +8. Today's date is 8 September and the day is Friday, but on the calendar 8 September is showing as a Saturday instead of Friday.
mwl-calander did not provide support for timezone, you can use full calander
https://fullcalendar.io/
Demo https://fullcalendar.io/js/fullcalendar-2.9.1/demos/timezones.html
Its angular directive can be found at
https://github.com/angular-ui/ui-calendar
It would appear that this particular UI control does not support selecting a time zone. Simply using moment.tz.setDefault is not good enough, because everything the control is doing both internally and in its external API is using Date objects, which cannot represent arbitrary time zones. In other words, the author of that control would have to remove all .toDate() calls and use Moment objects as the primitive in the control instead of Date objects. That would be a breaking change for them.
I suggest filing an issue in that project's GitHub repository, and reference this page.

how to push correct time from input textbox in angularjs

i want to push time in my database but when i push time my $scope.moreadditems variable its save wrong time please help me i am using angularjs
check when i enter time 9:00 AM why this show different time
check jsfiddle
i am adding below time its working fine add in table
but when i click show details its show different time
and also this time in database why
input[time] will always output datetime of 1970-01-01 + the time you inputed, see documentation here.
If you just want to keep the time part, you can use filter date to pick it, and don't forget to inject $filter first.
var timeHHMM = $filter('date')(time, 'hh:mm');
refer demo.

AngularJS - Is it possible to show data in a specific time range?

hope someone can help me with this question.
I have an entity which contains a start time (let's say 15 o'clock) and an end time (let's say 16
o'clock). It also contains the date (let's say today^^).
So my query returns all data of today, but I only want to show the data between 15 and 16 o'clock.
Do I need to set a $timeout for each object? Or is it possible to automatically call a method called shouldShowData which used in ng-show?
Basically I have a list of objects and want to show single object just on a specific time of the day.
EDIT
Imagine that the screen is shown in a public place and displays different news at different time (morning news, evening news, ...) and should automatically update when the specific news should be displayed based on it's start and end time. It can't be updated manually with a refresh button for example.
Great to here from you :)
I have found similar problem and solution for it here
All you need is to wrap this into $filter and use on ng-repeat.

Google Calendar API - List Event with startDate and EndDate Filter

I can't understand how Google Calender Event List work with timeMin and timeMax parameter.I am using the following statement for filter events. (Used Google Calender V3 API)
service.events().list(calendarId='primary',timeMin=start_dt,timeMax=end_dt)
I have created event from 23-12-2013 to 26-12-2013 without specifying time.
Now when I specified timeMax=2013-12-23T00:00:00+05:30 and timeMin=2013-12-23T00:00:00+05:30 then and only then I have got event in list if I specified timeMin greater than 23 it gives me event['items']=[]. Also not understand timezone.
Can anyone help me to understand this.

Resources