Stripe set subscription to end on a particular date - javascript

I have a subscription plan which I am initiating using stripe subscriptions.
It is billed monthly.
So if a person subscribed at 9 PM on Dec 7th, he/she should be able to use the product till the midnight of Jan 7th on the next cycle.
And then the cycle should keep on going for the next cycles as well.
My idea here is that, if a person subscribes to a product in the morning of a day, he/she should not get cancelled out towards the evening and all of the next month. He/She should probably get the entire day of their last cycle date.
And the same should be carried out for the next cycle as well.

Related

Is there a way of adding a button or a pop up message against a dynamic day

I have a google sheet that adds a number of tables depending on number of days worked and at the end of the week I want it to add a link to another tab for a weekly review. For instance if they work monday, tuesday, thursday and friday, then when they are completing the last day (friday in this instance), for it to have a button that hyperlinks or at least reminds them to now complete the weekly review
I've tried searching for code, I've tried adding a button, but it only adds a button if you do it yourself, I can't see how to add it as a piece of code, because the number of rows in the spreadsheet is dependent on the number of days worked, so I can't just add it as something already there
Whatever day is the last working day (could be any day of the week), then a reminder comes up to go to the weekly review tab (or take them to it)

Datepicker custom selection Javascript / jQuery

I need to make the datepicker like this:
just a brief intro, my project is to make something like employee holiday request.
so that the employee can apply their day-off request, but here's what my boss ask for the requirement. Sunday, and world official holiday need to be automatically added when the user picked the previous date or after.
Ex : 25 December is Christmas day.
Then I (as the employee) lets say pick 24th Dec and 26th Dec as my day-off. Then I may not skipped 25th December, it needs to be calculated as well.
That means I already used my 3 days off chance(my office only allow 12 days day-off in a year).
Sorry for the long explanation, I'm a newbie. I just want to know is this possible and if so, how? can you at least show me the trick. THANK YOU SO SO MUCH

how to hide times from fullcalendar other than businessHours

I am working on fullcalendar plugin. I am facing an issue hiding other times than businessHours. My Calendar starts with 12 AM and i want to start it from the businessHour lets say, 10:00 AM to 07:00 PM
i also want to know can we reload fullcalendar. I have to give choice if user want to see in timeSlot of 15 mins or 30 mins Whenever user clicks on that fullcalendar needs to be reloaded with the setting done by user.
Please help me fixing these.
Thanks,
Amod

Fullcalendar select specific period of time in an event slot

Is their a way to select a specific time in an event? For example, the time slot is from 8AM - 12Am and someone wants to schedule from 10AM to 11AM.
Can anyone give some advises on how to do this ?

How to visibly disable past timeslots for Day view jQuery fullcalendar

Is their a configurable way to visibly disable the past timeslots for the current day in the Day view of jQuery fullcalendar?
I'm displaying business hours 9:00 AM to 6:00 PM for the day. Consider the time now is 12:30 PM, I need to block users to book any events prior to 12:30 PM. Also the disabled timeslots has to be greyed out and unselectable. I can write the select callback validating the time selected. But need a visual effect to let the user feel that the past timeslots are not selectable.
Welcoming custom scripts too.
You could use eventAfterAllRender and append a css class to all slots which have passed.
It should be easy to work out how many rows you need to apply the class to (time of day in minutes / 30). Add the disabled css class to the td's and style with whatever you feel like.
This obviously won't actually disable the slots though and you will need to use the dayClick callback to disable past times

Categories