I noticed that no matter what day it is the all the days before the current day in the month for are greyed out so they appear to be in the previous month. The trick is to actually test this out you have to force your system time to change. Luckily I work with vagrant/virtual machine ;)
Here is the problem
Today's date is Nov 12 2015.
Here is the month calendar for today:
Notice how the 12th appears to be the first day in the month
Now if I force my system day to Nov 20 2015
Notice how the 20th appears to be the first day in the month
I am pretty sure the problem is in Drupal\calendar\Plugin\views\style\Calendar->calendarBuildMonth
I will work on the fix.
How to fake time on VirtualBox.
This method is not specific to using Vagrant
- With your virtual machine stopped run this command on host: VBoxManage setextradata VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled 1
- start the virtual machine
- ssh into your virtual machine run: sudo date --set="Nov 20 02:57:27 EST 2015"
Once you are finished
- Shutdown your virtual machine
- on host run: VBoxManage setextradata VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled 0
Comments
Comment #2
tedbowOk it looks like this probably a know issue because date arguements
I found this comment in Drupal\calendar\Plugin\views\style\Calendar->render
This is what is setting minimum date for the range.
I will mark this as Postponed soon as it looks like it need date arguments to be fixed.
If anybody else knows that the date arguments have been fixed and this comment should actually removed let me know.
Oh well, at least learned out to fake system time on my virtual machine
Comment #3
tedbowPostponing this because it probably won't be an issue once this is resolved f #2613454: Port Date module functionality missing from 8.x core
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous at XIO commentedThe argument handler used, is one we specifically added for calendar since the date handlers in core are not sufficient and the date module doesn't provide us with one (yet). Some additional info can be found here: see #2567815: Add week, date, and year-month Views argument plugins.
If you can use the range to calculate min_date and max_date, it's available:
$argument->options['calendar']['date_range']
. But I'm not sure where they were set in the 7.x version.Fwiw, we kept the argument handler to a bare minimum for now. As long as we don't know what will happen with the date module, it's quite possible that the handler will move out of the calendar module.
Edit: you postponed this while I was typing (had this open for a while :)), but I wanted to confirm your findings anyway
Comment #5
tedbowFixed from other commits