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.
I fixed that last night but it was already too late because the update I pushed was approved so I pushed another update. I’m waiting it to be approved now. The error is in the addInitialEvents function. There is an if statement which checks for mobile and inline and binds the click event but the if should be inside the click not outside.
Please try the updated version.
Brilliant. Its working now, thanks!
Not sure if this is the best place to ask, but was wondering about the possibility of a new feature.
I have one input box that i would love to be able to select “multiple-but-not-consecutive-dates” for.
For example, a calendar pops up and I can select ALL these dates individually: 01/1/2017, 20/1/2017, 03/2/2017, 07/2/2017,
The current plugin I’m using is here: http://dubrox.github.io/Multiple-Dates-Picker-for-jQuery-UI/ but after using your current date picker I can’t face how ugly it is anymore!! I would love to use your much better looking plugin for this input field too!
If you need to contact me for further discussion etc, just add gmail.com to my username.
Thank you!
Hi jonnywilliamson, this would be a good feature, but I guess it will get this picker out of it’s scope as it is a range picker IMHO. But this can be a seperate plugin. I’ll add it to my to do features list and check what I can do.
Fantastic. Thank you.
You’re welcome 
Just checking to see if your “to-do” list is getting any smaller! Happy to pay a few bucks for a new plugin!
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
Hi Matt, thanks for buying and using it, you can use the startEmpty option to achieve that. And for the second issue, right now it only supports this way but I’ll code a easy solution on the next release.
Hey, thank you for the quick reply….I’ve used the startEmpty option now, however the field now requires two clicks to trigger the picker (or a tab to focus then click), anything we can do about this)....when do you think the next release will be out with the amended month changer (just roughly)
Thanks so much
Matt
It might be some other event handler interfering with the plugin. You can test it on an empty page to test it. And for the other thing, probably this Monday I’ll push the update here. And in 2-3 days it’ll be approved I guess. Maybe earlier than that. I’ll let you know if I can finish early.
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!
Hi Bogdan,
You need two instances with { singleDate: true } enabled on both of the pickers, then you need to add this event to the start date picker:
$("#startDate").caleran({
onafterselect: function(caleran, start, end) {
var caleran2 = $("#endDate").data("caleran");
caleran2.config.minDate = start.clone();
}
});
Hi tpaksu,
I tried that, the range picker doesn’t work anymore, they both act as “singleDate:true” inputs.
Could you give a working example where 2 inputs are used with range picker ?
Please note that range picker should also work if visitor first clicks #endDate.
What do you think, is it doable ?
I guess I didn’t understand what you’ve asked. You need two date range pickers wih the same configuration, and what is the relationship between them? You can instantiate two range pickers already on the same page with different initializers. Can you explain the relationship in between the two range pickers?
so..
I have a form with 2 inputs: #date-startperiod #date-endperiod
Would like to use range-picker format (with custom ranges feature). When visitor clicks on any input (end/start) to be able to select range from date picker/custom range selector.
Once a range is selected, if visitor clicks on any inputs (start/end), the same range selection to be shown.
Each input should get single date value (start or end).
Current code looks like this:
jQuery("#date-startperiod").caleran({
calendarCount: 3,
autoCloseOnSelect: true,
minDate:'<?=$startingdate?>',
startOnMonday: true,
singleDate: true,
locale: '<?=ICL_LANGUAGE_CODE?>',
onafterselect: function(caleran, start, end) {
var caleran2 = jQuery("#date-endperiod").data("caleran");
caleran2.config.minDate = start.clone();
}
});
jQuery("#date-endperiod").caleran({
calendarCount: 3,
autoCloseOnSelect: true,
minDate:'<?=$startingdate?>',
startOnMonday: true,
singleDate: true,
locale: '<?=ICL_LANGUAGE_CODE?>'
});
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 Austin, I’ll try and let you know.
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” ?
Hi, doesn’t autocloseonselect option work?
It works only on normal view, in mobile you have to click on “cancel” or “apply”.
you can use a workaround:
onafterselect: function(caleran,start,end){ caleran.input.find(”.caleran-apply”).click(); }
This will not trigger any errors in the normal view, right ?
I guess not, just will re-trigger the input updates, but you can also call the close method caleran.hideDropdown(null) directly.
The method “onafterselect” is fired after clicking on apply, not while clicking on the date (mobile view). I need it to be fired when clicking on the selected date, not apply button.
in the cellClicked function, copy line 581 inside 583. It’ll solve your problem. Don’t forget to remove the this.config.inline check.
I tried from your guidelines this:
if ( this.globals.isMobile === false ) { if ( this.config.onbeforeselect( this, this.config.startDate, this.config.endDate ) === true && this.checkRangeContinuity() === true ) { this.globals.firstValueSelected = true; this.updateInput( true ); } else this.fetchInputs(); if ( this.config.autoCloseOnSelect && this.config.inline === false ) this.hideDropdown( e ); } else { if ( this.checkRangeContinuity() === false ) this.fetchInputs(); if ( this.config.autoCloseOnSelect ) this.hideDropdown( e ); }
and didn’t work 
did you also set autocloseonselect to true? it should work.
Yes I did, but not working
do you see any error on google chrome developer console? can you debug it if it reaches your code? I’ll try here too.
Nope, Google chrome console is clean in my calendar page. Actually everything is working fine, except applying the logic of onDateClick instead of onApplyClick.
I just added
if ( this.checkRangeContinuity() === false ) this.fetchInputs();
else if ( this.config.autoCloseOnSelect ) this.hideDropdown( e );
to the else block, and it worked.
I tried this, but still selecting the date and close the modal on mobile after I click Apply.
Try it while enabling the “toggle device toolbar” from google chrome console.
I tried with that. Maybe it’s something else interfering with the script? can you add an alert to the else block before hidedropdown?
It is working good in multi picker, in single picker won’t close automatically (in mobile view)..
Actually the code you just added, breaks the selected dated .. showing wrong dates in multi
Can you mail me from my profile page contact box?
Sure.
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
Hi, can you give an example of an input of yours and the format option that you are using?
Also, if you are using moment functions externally, you might want to check these questions and answers here: https://stackoverflow.com/search?q=moment.js+deprecation
$("#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.
Hi,
Can you look at the changelog version below that info, what is the latest version in the changelog? That’s right, I forgot to change the line you’ve mentioned when I posted that release.
And if you see a version below “1.2.2” can you please re-download the script and use that version?
Yes, the change log has 1.2.2 version, but since hideDropdown still did not work without radnom parameter and that line was 1.2.0 u suspected that i might have wrong version.
Also I have problem with setting target:
// Caleran is date icon button. (input field is left) $(”.caleran”).each(function (index, element) { // Get date button. var targetID = $(this).data(“target”); var targetPolje = $(”#” + targetID);
// Inicijaliziraj caleran.
$(this).caleran({
singleDate: true,
startOnMonday: true,
calendarCount: 1,
showHeader: false,
showFooter: true,
autoCloseOnSelect: true,
locale: "hr",
format: "DD.MM.YYYY",
oninit: function (elem) { elem.config.target.val(''); },
target: targetPolje
});
});
I can’t get it to work, “targetPolje”” is <input> element.
Here is html.
Sorry everything gets messed up here, are there any code tags for posting code?
asp-for gets replaced with id=”...”. Also using jquery 3.2.1.
Does passing “null” as the parameter fix your problem? I forgot to add an “undefined” check inside that function. The correct way should be adding null as a parameter.
and maybe the problem is that the label and the input has both “asp-for” attribute which may be replaced with two identical id attributes and the script might be confused with it.
Yes, passing null fixes problem, but I still have problem with setting target property, can you please investigate.
did you read my last comment?
Hmm possibly, ill check that out and let you know, thank you.
asp-for for label does no get ID, here is raw html generated:
https://jsfiddle.net/xwummLsw/Ok, the problem is, you are initializing caleran with $(this) instead of “tarjetPolje”. try initializing with tarjetPolje.caleran(); and remove the target member on the options object.
Sorry i changed some code on the fly here is updated jsfiddle with html and javascript
https://jsfiddle.net/xwummLsw/7/How I understand it I should initialize .caleran on my calendar icon (span element) and I set target to input element where date is displayed, this is exatcly like in documentation, your button is caleran and input is caleran-target.
Can you please check one more time.
Here when i click date icon, i get calendar but on selecting it wont update input field which is set as target property
https://dl.dropboxusercontent.com/u/10356429/caleran.jpgCan you send me an email from my profile contact box?
I solved the issue, I needed to add SPAN to valElements in caleran.js
valElements: [ “BUTTON”, “OPTION”, “INPUT”, “LI”, “METER”, “PROGRESS”, “PARAM”, “SPAN” (added) ].
I wonder why you would limit to these elements, cause calendar trigger could be any of many html elements, such as div, span, a, etc.
Because valElements only contain the elements which could have a “value” attribute. SPAN element is not one of them. I’ve sent you an email last night which contains the updated version. Did you have the chance to check it?
I found your email now, it was in spam folder, thank you i’ll check it now.
I tried new version, it works! Thank you 
I only have one more question, whenever I open calendar it immediately sets current date to input filed, i would like nothing to get written to input filed unless user clicks on date, is there a way around this?
yes, you can use “startEmpty: true” and dismiss the init event.
I did, it does not have effect. Tried it in firefox and ms edge.
https://jsfiddle.net/n7oLk8n7/Hmm sorry, caleran doesn’t have the startEmpty option, calentim does. I’ll add that and send you the updated version.
I’ve sent you the update.
startEmpty works now! Thank you very much.
I also noticed one more thing now, when I open calendar by clicking calendar icon, and then open another calendar the previous one stays open and i can’t close it.
I didn’t notice this before because i would close first one it by cliccking somewhere else, also is it possbile to close calendar by clicking the same icon second time?
I think other calendars should close if other is opened, i mean shouldn’t only one be open at a time?
Also, autoCloseOnSelect stoped working in latest version you sent me.
I’ve sent you an update with a fix about other calendars’ closing issue.
Jsfiddle wont run, i tried latest version and calendar now closes properly (multiple issue), great!, would be possible to close when I click the same button again?, Like first click opens it, second closes it and so on..because otherwise you either have to select date or click somewhere else on screen to close it. It not a big deal but it seems like standard behaviour.
Regarding autoCloseOnSelect it still wont work, it did work yesterday i’am sure, and there was no other js code that I added to my project.
Yep, it works on chrome but not in firefox. I’ll check that.
Sent you the update.
autoCloseOnSelect works now in last version, but showing only one again now stopped working, other calendars stay open, sorry to bother this much 
- v1.2.3
*
—— * – fixed event duplication on document click * – fixed outside triggers closing dropdown * – fixed target element confusion when different target option is specified * – added startEmpty option * – fixed multiple instance closing issues * – added missing event parameters to hideDropdown method
Also clicking on same button does not close opened calendar.
So in short:
1. startEmpty: works. 2. autoCloseOnSelect: works. 3. Close previous instance when opening new one: stopped working. 4. Toggle calendar open/close when clicking same button (would like to have if possible).
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
Hi, I’m not able to reach a computer right now, I’m on vacation but I can give you a hint, did you try changing only the other input’s value? Try that and let me know.
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
The example is official now: http://rettica.com/caleran/docs/readme.html#linked-single-date-pickers
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…
Yes, but you need to click the same day twice, because you need to define the start day and the end day as the same day. You’ll get two same dates this way.
If you want to select with one click, I think it doesn’t provide that.
But maybe, you can use the “singleDatePicker” option for the plugin when initializing the date picker related to two radio buttons.
For example you’d have two radio boxes, “single day event”, “multi day event”, and when the user selects one, you can re-initialize the caleran plugin with single date selection / range selection option.
Thanks for the quick reply – would you be able to custom-code the functionality for us that I described on top of your existing picker? we’d also look for the time-picker to be included if possible…
The time picker has time to be completed but I’ll be coding an example about how to change the picker type.
Look at this example:
http://rettica.com/caleran/docs/readme.html#switching-multi-single-pickerHi 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.
Hi Andy, you can check my Calentim plugin. https://codecanyon.net/item/calentim-date-time-range-picker/20099228
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.