Git Product home page Git Product logo

datepick's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

datepick's Issues

How to clear dates values

Hi, i'm developing a project with this plugin but i have some troubles:
when i select the first date of a range, i check if the next 7 days are in an array containing some dates. If the selected date is in it, i need take the datepicker back to the initial state where no date is selected... I'm trying create a function for the "onSelect" option, but I don't know how to clear everything. How can I do it?

Thank you.

Inline calendar has a day highlighted when you change months.

When initializing this plugin as a calendar it highlighted the first day of the month as it would be the actual date. It is also visible on the datepicker homepage in the inline calendar. When you change months it always highlights the actual day number in the given month. The highlight disappears then you hover over the calendar.

I fixed this by removing 'renderer.highlightedClass' in line 2077.

Add days

I want to make the minDate of the #endPicker equal to the #startPicker value + 5 days.

$('#endPicker').datepick('option', 'minDate', $('#startPicker') /*+ 5 days*/);

I have trouble to use the add function, can you help me, please?

Clear the inline datepicker while using range.

Hi i have used the datapicker plugin and the range too works fine but when i want to clear the dates selected externally using a button i wrote a command $(selector).datepick('clear'); which dont work and i am using the 4.0.1 version only.

Keyboard handling bug with multiple datepickers on line 1508, fix included

Keyboard handling is borked on pages with more than one datepick control. There's a $() call which isn't scoped properly because inst.div is undefined for inline datepickers.

I fixed it by changing the following code on line 1508:

plugin.selectDate(elem,
    $('a.' + inst.options.renderer.highlightedClass, inst.div)[0]);

to this:

plugin.selectDate(elem,
    $('a.' + inst.options.renderer.highlightedClass, inst.elem)[0]);

Minimum range selection

Hi, could you point me to implement an option to allow a minimum number of days that can be selected in a range? I tried messing around with the code but had no luck. Thanks.

iPad Safari throws error on Date change

To replicate:

  1. Turn on debug mode on iPad Safari
  2. Load up a calendar, change month to another month. (Tested using latest jquery.datepick.js)
    Safari will have thrown an TypeError: 'undefined is not an object'

This error does not exist in Safari desktop. I assume this is something to do w/ the way that iPads replace the selectors w/ native selectors. Any input / thoughts on this would be great.

Thanks :)

Scroll Offset to calendar

Hi

I have a calendar on the Middle of the page www.example.com/location when I come on this page from another page the scroll is middle of the page where is my calendar instead of the top of the page as normal behavior.

I check with option i can not get offset 0

disable dates

Can you add the possibility to disabled dates:
single dates
days of the week
date ranges

Disable the softkeyboard or datepicker on smartphone

Thank you for provide this plugin. I use in on one of my website.
It is working great on desktop.

When on mobile phone, or smart phone, including android or iPhone, datepick calendar is shown as normal, but at the same time, the smartphone built-in softkeyboard also displayed on it.

My question is how to disable any one of them on mobile phone.

Need angular wrapper for this plugin?

Hi,
This plugin seems really cool,providing solution for real life use cases in terms of jquery.But it would be great if it can be integrated with angular.

Thanks & Regards,
Neel

How to allow selecting date range from end date to start date

Right now the plugin allows users to select a date which becomes a start date and then any date after it which becomes the end date and hence we get a range,

I want to be able to select two dates in any order, say first end date and then start date and get the range.

How can I do this ?

fix autoSize for rangeSelect DatePickers

autoSize only calculates the input width for one date, even if rangeSelect is true.
I think for a date range it should use the width of two dates and the separator.

Apart from that great plugin.

Conflict with flot

When datepick is on the same page as flot, flot's resize plugin doesn't work.

Whenever the browser window is resized, an exception is thrown inside of jQuery, and datepick.js:2089 is the first thing in the stack that's not a jQuery internal.

Multiple months display is broken

Hello,

First of all thank you for your this wonderful plugin. I've been using it for a while and just noticed this weird bug. I don't know when it started.

When monthsToShow option is set to more then 1 clicking on anything in those extra months just switches months. Something like next months click all over the calendar. It can be tested in your demo under tab Multiple and then click on any date in other two months. First month one works normally. Tested in all the latest browser, inline and normal and it is the same.

Best regards! Sasha.

Start range and End range classes

I would like to add start range class to first date in selected range and end date class to last selected date in range.

Is it already possible to do this somehow. If not, does it make sense to implement it and add 2 additional options for classes that should be used?

Enabling Previous Dates... or all dates?

Unless I'm missing something, this is more of a question than an issue....

I have rangeSelect = true
I've noticed that when you select the first date, all previous dates before the date selected are disabled. Is there a way to leave these enabled? We are trying to allow a user to select an end-date first, then select a previous date as the first date in the range.

I've been banging my head trying to figure this one out, any help will be greatly appreciated, thank you in advance....

AMD Support

First of all, thanks for your work on this. It's by far the most feature complete and visually appealing plugin for displaying calendars. Anyways, we've recently started using requireJS to load javascript modules asynchronously and I was wondering if there's any chance of offering built-in AMD support in future datepick versions.

2 issues with close on click and click event not working sometimes

Hi, im using the datepicker for my project it looks very nice, thanks for the hard work.
i have encountered 2 issue with the datepicker:

  1. after setting the date using $(selector).datepick('setDate', date);
    clicking the input element does nothing, only after sometime i can reuse the datepicker.
    i use 2 datepickers to present date range, i allow selection only of 1 week, if one chooses 11/26/2014 (in any of the date pickers) the range will be 11/24/2014 - 11/30/2014.
    after the choice the datepicker i choose from doesnt work (when i click the inuput element nothing happens) only after like 10 seconds it available again.

2.clicking on iframe does not close the datepicker, only if i click outside the iframe, it closes it.
the datepicker is on the page not in the iframe..

Thanks!

selectWeek processing has a logic error

Hello Keith,

while updating from 4.0.6 to the lastet stable version i refactored my code too and found out that there is a difference between a selected single date processing queue and a selected week processing queue. I debugged the related functions using console and found the following to happen for a single date selected:

entered _selectDatePlugin
   entered _updateInput
      ... calling onSelect-handler
   passed _updateInput

   entered _update
      ... is inline || plugin.curInst == inst
      ... is inline
   passed _update
passed _selectDatePlugin

the following log refers to a week selected:

entered renderer.onWeekHeader-clickhandler
   entered _setDatePlugin
      entered _update
         ... is inline || plugin.curInst == inst
         ... is inline
      passed _update

      entered _updateInput
         ... calling onSelect-handler
      passed _updateInput
   passed _setDatePlugin
passed renderer.onWeekHeader-clickhandler

Notice the inverse call order of _update() and _updatePlugin(). For week selections this causes the onDate handler to be executed before the onSelect handler, whereas they're executed in correct order for single dates selected (onSelect before onDate). This furthermore prevents for instance changed CSS classes for each of these dates, that are registered in an external object by the onSelect handler, not to be applied before picking another date, because while the related date is processed by onDate, the new CSS class cannot be found, because it is registered afterwards.

For testing i inverted the calls for _update() and _updatePlugin() in _setDatePlugin() lines 1524 and 1525, which is how it is implemented in _selectDatePlugin(). This solves the issue. onSelect is now executed before onDate and a color change works as intended.

// before
if (!setOpt) {
   this._update(target);
   this._updateInput(target, keyUp);
}

// after
if (!setOpt) {
   this._updateInput(target, keyUp);
   this._update(target);
}

'change' event is broken

Hello. I have a date input with attached event listener for 'change' event. When I add datepicker for this input this event stops to rise for manually entered data. How this can be fixed?

calendar picker is conflicting with date.js

I have set -up calendar-picker and added hijri calendar picker successfully and when I add date.js in the same project It gives me error saying

Uncaught TypeError: year.calendar is not a function

May be this is because of the year being an object in the keith-wood and year being a integer in the date.js
What is the solution for this?

PS: I can't remove either of them from the project.

multiSelect and rangeSelect a week don't work together

I wanted to be able to i) select single days by clicking onto ad date, or ii) a whole week by clicking onto the week number, and later to iii) deselect single days from a (as a whole) selected week.

The following is combined from your examples but it does not work as expected, which makes the content of this formal bug issue:

$("#calendar").datepick({
    renderer: $.datepick.weekOfYearRenderer, 
    firstDay: 1,
    showOtherMonths: true,
    rangeSelect: true, 
    onShow: $.datepick.selectWeek,
    multiSelect: 999,
    showTrigger: '#calImg'
    });

So what I basically suggest is also a redesign (improvement) of your datepicker, so that multiple and single dates, and ranges from ... to ... can be selected.

A working library for detecting keycodes is https://github.com/jeresig/jquery.hotkeys - so that Shift-and-left-mouse-click and also Ctrl-and-left-mouse-click actions could be detected and used for selecting (or deselecting) ranges, week, or single days.

If needed, I can write a formal issue with a concrete proposal. With the current version, it's not easy to code for non-experts, but once we have a working example, your extension, which already has a lot of useful option but lacks the described features, will become the best of the multi-date-pickers.

show only month and year

Hello there!
Is there any way to show only the names of the months and year?

Greetings

example

zlbx9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.