Is there any chance in “calculate formula” to add formula to calculate years, months, days and date between two dates?
If it can’t be done is there any other way to calculate on this point not user to choose dates and after that to have the calculation.
Using Date field, you can do it directly. Have a look here : https://bubble.io/reference#Data.Messages.date.minus
Substract the two dates, and returns the difference as a ‘Time difference’
Not sure what you meant by this?
You can directly write Date1-Date2. The result will be the interval.
I feel pretty stupid but I honestly spent a few hours and still couldn’t make it work.
I think you meant this one:
but I need to be predefined the years, months, dates and days and when I click for example on January 2016 to visualize things in a repeating group.
sorry I can’t understand your issue like this.
can you set a clear demo of what you want to acheive in the forum_app ? i’ll be glad to help
This is just visual example - there is no logic or specific reason to use Button or Input element.
my point with example app is when you choose year, month or date to show you the events that were scheduled for the specific year, month or date.
ok, it’s clearer with this.
I would advice you add the fields you’ll need as a criteria. So when you create a new Event, you extract :
- Year = Date of the event :extract year
- Month = Date of the event :extract month
and so on.
So you can filter the search based on filters which are Custom States
Have a look at the modification I’ve done and test the filter for “January”
Is it clear and solve your issue ?
Thanks for your time. Appreciated it.
Still have an issue with calendar thing but I guess I will continue search for external source because the FullCalendar feature is not working for me.
Hi @nicolas.daprigny
I’m trying to figure it out this “custom state” thing and I’m using your example but still can’'t.
So I’m going to ask regardless how stupid may sounds.
So you workflow is:
- When Button “X” is clicked
- Set state MonthFilter of RepeatingGroup Event - value 2
When I press button “x” and all of the events for month 2 can be view in repeating group
The part that I don’t get it is the State Type that is behind MonthFilter.
I tried with state type - number but it’s not working.
I saw a few discussions in the forum and as far as I know there is no way to see what is
configuration behind the ‘State’.
Thanks a lot in advance.