FullCalendar, display event creation during select - javascript

I'm currently using fullcalendar 4 on my website and I'm trying to add an indicator that the user is selecting in the calendar, there do is the background color changing but it's kind of hard to see.
My goal would be to recreate the selectable date part of the demo page, where if you go into the week vue, you can see the event appear during the select.
I'm stuck since full calendar only activates the select function when the select is over so I don't know how to start creating the event at the select start wether it's with an option in the calendar that I haven't found or if there's another way.
Since it's in the demo I though it would be feasible but right now I'm having a hard time with that

This is done by setting the selectMirror option to true.
Documentation: https://fullcalendar.io/docs/v4/selectMirror
Demo: https://codepen.io/ADyson82/pen/RwGBrQP

Related

Is there any logic to implement two calendars at a time on a click using angular7?

I am unable to implement two calendars at a same time on button click!.Is there any way ??I have got the references using Angular-JS. But I want the code to be in Angular 7 and on the click, both the two calendars should appear at a time so that I can choose start date in one calendar and end date in other.
click here for Screenshot
I always use ng bootstrap for those functionalities. Try it,
https://ng-bootstrap.github.io/#/components/datepicker/overview

Opening a v-date-picker v-menu on click and focusing a v-text-field inside it?

I've got a date-picker component in an app and used the example for a menu to open it.
I now want to make it more efficient to use for desktop users, so I removed the readonly flag to make manual input possible.
Now desktop users can simply tab through the different fields of the form to quickly input dates and times. The problem here was that the date-picker would not show up when a user tabs into a field, which was easily fixed with adding #focus="menuVariable=true" to the text-field.
But the problem now is that the date-picker won't show up anymore when a user first clicks into the text-field, at least not consistently, which I haven't been able to fix. I already tried to listen for click events and setting the menu's toggle to true then, but I guess the problem is setting that variable in the first place. Not sure how to work around this or how to open that menu manually any other way.
Here is a codepen showing off the problem. Click around a bit between the two fields, the date-picker on the right always opens, the one on the left only occasionally.
Does anyone know a better solution to consistently show the date-picker when a user either clicks into the text-field (or any other part of the v-menu) or tabs into the text-field?
#keyup="menuVariable=true"
#keydown="menuVariable=false"
I worked with this.
there is a nice solution here:
https://codepen.io/Phennim/pen/KKPYGRK
v-on:focus="onFocus"
v-on:blur="onBlur"
Hope it helps you

Looking for JS datepicker modular script that can plug in to custom JS date range picker

(This might not be specific enough for StackOverflow, but I do have actual code samples. If you think it's too vague, let me know in a comment or vote to close.)
Background
I'm designing a date range picker for an internal web application. The way it works is that clicking on an input will pop up a list of pre-defined ranges, similar to how date range selection works on Google results:
Only if a user taps on Custom Range/Date will they get a calendar. There are panels inside the popup, sliding sideways, and they'll see one or two calendars (if range or if single date).
Problem
I'm looking for a date picker script that I can plug into my existing custom date picker class. I'd like to be able to call it from JS, and attach a callback to return the date. There will be no input HTML elements.
A perfect API in my mind would let me do something like this:
var beginDatePicker = new DatePicker({
default: beginDate,
callback: function(event){
// do stuff with returned date
}
})
... .appendChild( beginDatePicker.el.wrapper );
That way I could create a calendar, then use the callback to store the date and animate to second calendar, and then finally place the dates in the hidden inputs.
I can't find any open-source datepicker scripts that are modular though. They all require an input element, but I need to be able to create and destroy the calendars as I go.
Do anyone know of a library/script/class that works in the above manner?
Answer
It doesn't exist, anywhere I can find. The solution is just to take an open source option, fork it, strip out the pieces that I need, and use that.

Jquery Calendar and how to setup a connected booking calendar with two input fields

When it comes to a booking calendar with a start and end-date, I think http://www.swiss.com (choose two Airports, click on search and you will see the date fields) has the perfect execution.
It basically works like this:
There are two input fields for outbound flight and return flight. If you click in either one of those, two calendar pop up. One under each input field.
They will stay open if you choose a date in the first calendar and only close if you select a date in the second calendar.
In the mobile view - where there isn't much space - only one calendar opens and the second opens when you choose a date from the first one.
I think this is a much better solution than having one large input field only and sort of a 3-month calendar to choose start and end, which seems to be the most used option for these kind of setups.
I figured I'd use the Jquery Datepicker: http://keith-wood.name/datepick.HTML as it seems it's powerful and easy to style. But I cannot find a way to keep the datepicker open and only close it when the second datepicker has a date chosen. The documentation seems not to mention it, and even with all the demos on the page, this particular problem isn't addressed.
If someone knows a solution to mentioned setup, I'd be really glad to get some pointers. I'd also switch to another calendar plugin if there is one in which this is easy to implement.

jQuery UI datepicker css customization

Let's say I want to display a datepicker. This datepicker represents a disponibility calendar from an hotel room. Knowing this, I want before displaying fetch data from the server to know the disponibility (I know how to do this).
My question is: How can I change the css to show dates with disponibility different from the ones that doesn't have?.
Second Question: How can I disable clicking those ones that doesn't have rooms available.
Example: JetSetter calendar
You can check this page to disable the days you want :
http://davidwalsh.name/jquery-datepicker-disable-days

Categories

Resources