Code

Discussion on Caleran - Date Range Picker

Discussion on Caleran - Date Range Picker

By
Cart 627 sales

tpaksu supports this item

Supported

This author's response time can be up to 5 business days.

287 comments found.

Hi tpaksu,

Love this picker, was using the version released before today with no problems. With the latest release today I just dropped in the new files (caleran.min.js and the css) and made sure the cache was cleared.

Haven’t terrible problems getting it now to work. I can get the desktop version to show the calendar when an input field is clicked. However no matter what I do, when viewed on mobile phone (iphone 6S or chrome dev tools), I cannot get the calendar to pop up.

Have started with absolutely empty options when creating calendar and still the same thing.

I have a hunch it might be hammer.js getting in the way….but I don’t have the knowledge to check or confirm this.

Hi Johnny,

I’m currently very busy right now because I’m going to move to a new house and I’m busy with packing and checking the furniture and painting on my new home etc. So I can’t spare much time besides my daily job to code new things. Maybe later. Sorry.

No problem! All the best with the house move!

Thanks :)

How can open Caleran after press key TAB in form?

Hi pollinoco, I pushed an update today, it’ll contain that feature.

Hi pollinoco, the update is ready. You can test it and use it.

Hi! I’d like to use the Caleran Date Range Picker, however I need a few customization to make the date picker work well with hotel/apartment booking websites (basically changing the date format). Can you help with this (paid of course)? Thanks!

Hi barnabased, can you contact me by using the contact box on my profile?

The design of this plugin is beautiful. Cool! However, i can’t see a calendar demo in real mobile devices when you set inline in plugin options, it will show input design not inline calendar and i need to click the input to show the calendar. Is it bug ? Let me know because i interest to buy. Thanks.

Hi rezzxzone,

The main reason it’s not working like that because I couldn’t decide how the mobile inline calendar should look, so I skipped to the easy way :) I’ll try to make it inline in mobile views, but I can’t give time for that.

Hi….awesome picker…couple of questions….. How do I get the picker to not fill a date in on init…I.e. I want the page to load with the picker ready to go, but I don’t want a preselected date filled in in the input field

also.. with the month/year picker….how to we navigated through years, there is only a small selected prior and after the current year, making it difficult to navigation say to a birth day 40 years ago

Thanks

Matt

ah ok thanks,...I’ll check, it could be the form validation plugin I’m using….all in all it really is a great plugin…..I haven’t really looked to see where you can do linked calendars over two inputs yet, but other than that is seems to do everything!! great work

Thank you for buying and using it :) Did you figure out the double click issue?

Hi mattcrane, can you reach me with the contact box on my profile?

I’m implementing your range picker on: https://goo.gl/G93QGk

But for some reason, on mobile, I need to click twice on the endDate. The first touch it behaves like hover, and the second touch like click.

How can I get this fixed so that each touch is considered a click ?

I used chrome on android and it was normal. Whats your configuration?

Hello,

I need good solution for using 2 inputs (dateStart dateEnd) for a range picker. Range selector should work from both inputs and keep configurations between them.

Do you have a working example that I can copy ?

Best!

You want both datepickers show the same date range when one of them gets a range defined?

Yes

date-startperiod should show starting date for the range

date-endperiod should show ending date for range

However when clicked (any of these 2 inputs) to show the range (start-end)

Ok, if I understood correctly, you want something like this:

$("#caleran-ex-1").caleran({ calendarCount: 3, autoCloseOnSelect: true, startOnMonday: true, onafterselect: function(caleran, start, end) { var caleran = jQuery("#caleran-ex-2").data("caleran"); caleran.config.startDate = start.clone(); caleran.config.endDate = end.clone(); caleran.updateInput(); } }); $("#caleran-ex-2").caleran({ calendarCount: 3, autoCloseOnSelect: true, startOnMonday: true, onafterselect: function(caleran, start, end) { var caleran = jQuery("#caleran-ex-1").data("caleran"); caleran.config.startDate = start.clone(); caleran.config.endDate = end.clone(); caleran.updateInput(); } });

Hello, Currently it is not possible to click/tap a greyed out date which represents the next month. For example, say I want to select a range of 27th of July – 3rd of August. It would be intuitive to be able to click the grey area of 3rd (in the July calendar) and have Caleran auto-select 3rd of August as the end-date. Is this possible?

Thank you, Austin

Hi again, can you send me an email from the contact box on my profile page?

Thanks for implementing this feature.

You’re welcome

Hi,

your Date Range Picker looks really interesting. I have 3 questions though before I buy: 1) Can I have the 2 months one above the other, e.g. for mobile phone? (so vertical layout instead of horizontal) If I select a time range e.g. for a longer trip it could be normal to have something like: 13th of July til 13th of August. With one calendar it seems not possible to select such a range. 2) Can I enforce a minimum duration e.g. 3 days or more or a fixed duration (must be a block of 3 days)? 3) Can I enforce certain start days, e.g. the start must be a Tuesday or Friday and the duration 2 or 3 days?

Or would I get the source code (not minified) so I can implement that on my own if possible?

Best regards

Hi noan77, the source code is included, the styling is all written with SASS and everything is automatized with grunt. You can modify it as you wish before using. There are some examples in the documentation for limiting dates, formatting inputs etc. You can check them before you buy it to have an understanding about the plugin. If you can code jQuery, you’ll understand the whole thing in no time. The source code is nearly full commented.

Is is possible to set auto close on select in mobile view instead of forcing the user to click “apply” ?

Solved. Thanks man, you are the best .. genius :)

You’re welcome ;)

moment.min.js:18 Deprecation warning: value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.

I use this plugin and show the warning message, how can I fix it?

ives

$("#dob").caleran({ locale: 'zh-TW', singleDate: true, calendarCount: 1, showHeader: false, showFooter: false, format: 'YYYY-MM-DD', startDate: '1990-01-01', minDate: '1930-01-01', maxDate: '{{ "now"|date("Y/m/d") }}' }); It is my setting for date picker. I can’t understand where to fix it from the stackoverflow.

{{ “now”|date(“Y/m/d”) }} this might be the problem. because the format is different.

thanks, it work fine after fix to date(“Y-m-d”).

Hello,

I don’t seem to have latest version. in my js file says

  • @name: caleran – the date range picker * @description: An inline/popup date range picker * @version: 1.2.0 * @author: Taha PAKSU <tpaksu@gmail.com>

but latest version is 1.2.2.

Also hideDropdown() does not work for me if I don’t pass some argument. (I am using Firefox)

Please advise, Thank you.

Hmm I just noticed one thing, regarding toggling, it seems that it works for span but when I click exatcly at calendar picture then it doesnt, so the problem might be z-index or sometinh in my html code. sublelemnt steals click from span.

Other points stay.

Everything works now, thank you!

You’re welcome ;) Can you post a review for the plugin?

Great product! Very nice plugin, thumbs up!

I would like to ask how can I synchronize two input fields like on booking.com for example, so that if you choose a date in one the other one is start date would be the first one is selected date. Below is my code, it kind of does what I want but it doesn’t change the input field of the second calendar.

$(document).ready(function(){ var dateToday = new Date(); var format = "DD-MM-YYYY"; $("#awe-checkin").caleran({ minDate: dateToday, format: format, singleDate: true, autoCloseOnSelect: true, onafterselect: function(caleran, startDate, endDate){ // caleran: caleran object instance // startDate: moment.js instance // endDate: moment.js instance var date = endDate._d; date.setDate(date.getDate() + 1); console.log(date); var options = { minDate: date, format: format, singleDate: true, autoCloseOnSelect: true, ranges: { startDate: date } }; var checkout = $("#awe-checkout").caleran(options); } }); $("#awe-checkout").caleran({ minDate: dateToday, format: format, singleDate: true, autoCloseOnSelect: true, }); });

Thanks a lot! Kieran

Sure, I will try doing that.And get back to you later.

Enjoy your vacation! :)

And if it doesn’t work, try something like this https://gist.github.com/tpaksu/bb199d946922380e777c82058c834a6a

Having a NaN issue in IE10 :

I sent you an update. please confirm that it’s working. I’ll then release a global update.

It’s working, thanks a lot !

You’re welcome ;) I pushed a global update with the fixes on this site, when it’s ready, you all will be informed. And please, can you rate the plugin?

Either I’m overlooking something or it isn’t responsive, in terms of position, upon window resize; open the calendar and resize your window and it doesn’t respect where it was opened and instead ends up in a separate location looking very wrong.

Hi, currently the plugin doesnt respond to window resize event, it only shows different when initialized on mobile and desktop environment. You can try loading it in a mobile browser. And try viewing in landscape/portrait mode.

Hi, does this plugin allow within one view to select a single and if needed a date range at the same time? Our events might be on one day only or might in other cases be some days in a row…

The time picker has time to be completed but I’ll be coding an example about how to change the picker type.

Hi MichaelKaufmann, you can check my Calentim plugin. https://codecanyon.net/item/calentim-date-time-range-picker/20099228

does this plugin offer time selection?

Hi Andy, sorry, but it doesn’t support time selection yet. But I plan to extend it and release as a new product.

Hello,

First off want to say that your calendar widget is great. It’s exactly what we’ve been looking for!

One question: Is there anyway to default the input to blank? We don’t want it to be prefilled to a date range of today, especially on mobile.

Thank you!

Hi, thank you for using it! It’s nice to hear things from it’s users :)

And for your question: I guess you can hack this a little bit,

If you want this to be empty only on initialization (if you focus and blur it’ll fill that again) you can use this:

$("#caleran-ex-1").caleran({ oninit: function(caleran){ caleran.config.target.val(""); } });

If you want it always to be empty, I’ll need to work on some other method.

You can use the “startEmpty” option now instead of this code.

Hello I added this component to angular 2 but I need method in caleran function to detect attributes changes like {singleDate: true}

Hi, the plugin doesn’t support that, but you can watch caleran.config object with a timer (setInterval). If I would do that in the plugin, I would do that same to trigger the attribute change event.

I don’t need range I need select two seperated dates only can I do that

Look at the examples, there is an example about single date picker option.

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey