Fullcalendar plot error - fullcalendar

may I ask and need your help also. I am using a full calendar plugin latest version of v3.8.0. I create an event which is the start date is 2018-01-16 23:59:00 and the end date is 2018-01-17 08:00:00 (11:59pm - 8:00am) . The event is plotted only on 1 box which is the day of 16, but when is set it at 2018-01-16 23:59:00 and the end date is 2018-01-17 09:00:00 (11:59pm - 9:00am) the result is set 2 box from 16-17 day.I'm having a hard time on setting this time format for this plugin.

I assume you're talking about the "month" type of view, because this is the only situation where this behaviour occurs. It doesn't make any logical sense in the other view types.
Anyway, this behaviour is controlled by the nextDayThreshold setting. When an event's end time spans into another day, this option controls minimum end time it must have in order for it to be rendered onto that day. The default value is 9am
This can be useful if you have an event which ends in the early hours (e.g. a party) but you don't want people to confused into thinking it takes place the next evening, or runs over into the normal working day or something.
In your case, if you wanted your event to appear, you could set the threshold earlier, for example 7am, in order to change the behaviour:
nextDayThreshold: '07:00:00'
Here are two working demos showing you the difference when you change the threshold:
Default behaviour:
http://jsfiddle.net/sbxpv25p/93/
With nextDayThreshold set to 7am:
http://jsfiddle.net/sbxpv25p/94/
See https://fullcalendar.io/docs/event_rendering/nextDayThreshold/ for more detail about this option.

Related

Fullcalendar - Display an event with no end date

How do I go about displaying a long-running event with no end date? The data provided to me only shows when the event started but no end date because it's set to "Forever". It appears that when I only provide the start option, it only sets the event to show up on that day and not the following days.
I have a possible workaround for this, where if there is no end date from the event source, I always set the end date to 24 months from today, but that means if someone navigate the calendar past 24 months, the event would appear to have ended then. Would be nice to have something that will just keep going forever.

How to disable business hours in FullCalendar

I am trying to incorporate FullCallendar in one of our application to show events. Now I am facing a problem with business hours. In the month view it is showing wrong end date (one day less than actual) if any event ends before 9 am. So for example, say I have two following events
Event 1: Start date&time : 2016-11-09T10:00, End date&time : 2016-11-20T17:30
Event 2: Start date&time : 2016-11-09T10:00, End date&time : 2016-11-20T08:30
In this case in the month view, Event 1 is covering all dates from 9 to 20, however Event 2 is covering dates from 9 to 19.
I tried in Google with this issue and found following link
How to set the business hours
But it does not solved the issue. I want to disable business hours. I tried by setting it false. But nothing happen.
Please help
Please use nextDayThreshold option in full calendar
nextDayThreshold: '00:00:00'
for more information:
https://fullcalendar.io/docs/event_rendering/nextDayThreshold/

How can I display a repeating date field in Drupal?

I have a custom content type called events in which uses a field called event_date. When I set the date and look at the node, it correctly shows the date I entered:
However, when I do a dpm on node_insert to see the values getting saved, here is what's being reported to me:
As you can see, this is not what I entered in and these are the exact values that gets stored in the database as well.
My questions:
1) How can I get the correct values? (I'd like to get 03/30/2016 and 7:00pm)
2) Why are these values different but the node still shows them correctly? where the time being saved?
Thanks
I have answer for second question and then you will easier find answer to first one also.
You see offset of -18000.
That is 300 minutes.
Which equals to 5 hours.
2016-03-31 00:00 -(minus) 5 hours is 2016-03-30 07:00pm
So you need to use function to format date that will include that offset also. Check comments and links from: https://drupal.stackexchange.com/a/33686/32059

Telerik RadDatePicker not picking up dates post year 2030

I am using RadDatePicker control for start and end date input controls on my form.
I am taking "01/01/1980" as min date and "12/31/2049" as max date. I am facing a problem when I enter the date manually in Date text box.
Scenario 1: I enter date as 123129. RadPicker correctly picks it up as 12/31/2029 and displays the formatted date value.
Scenario 2: I enter date as 123130. I get a client side validation warning. No matter what day and month I enter, it freezes every time on year greater than XX/XX/29 (2029).
Scenario 3: I enter date as 12312030 - complete year instead of just last 2 digits. RadPicker correctly picks it up as 12/31/2030 and displays the formatted date value.
I tested all 3 scenarios on ASP.NET Calendar Demo - DatePicker - First Look as well.
I am not sure why the validation kicks in even when the max date is set as 12/31/2049. Please assist me in resolving this issue.
Thanks,
Vaibhav
"The years starting from 30 and greater are parsed as 19.. like if u say 30th(year) it would get it like 1930, 123130 will be parsed as 12/31/1930. this is invalid because the default value of the MinDate i.e. 1/1/1980.
In Order to solve this set the ShortYearCenturyEnd property of the DateInput to 2099.
Hope i answered the question.

How to create only a week calendar with previous and next week buttons

I am really stucked at this.what i want is that there should be 6 table cells in which i should have days with date. like
Monday 4/3/2013 Tuesday 5/3/2013 and so on till saturday
.i have two more buttons,previous week and next week button.. it should automatically show next week when i click the next week button and should show the previous week whenever i press the previous button..
also the i need to take the value of days/month and year so that i can use them in where clause in my sql query..pls its urgent can anyone help me with this...
im providing a link you can see what exactly i want by visiting this link
www.test.ginormous.in/dinesmart/Filestore/Food/Capture.png
i am just giving you the outline as posting the whole code is not possible.
create an asp:panel in your aspx page
try generating the table structure dynamically inside that panel by writing myPanel.innerhtml = "(your html structure generated in a string)"
use theDate.AddDays(7 - (int)theDate.DayOfWeek) to get the date for this weeks sunday.(where theDay is the current date or the date given by you and change 7 to 6 if you want it for monday as this returns date for sunday etc..)
on previous and next click you can add or subtract 7 days from the first day of the weel that is generated above.
hope this helps you.

Resources