Giter Site home page Giter Site logo

kennethanceyer / pg-calendar Goto Github PK

View Code? Open in Web Editor NEW
127.0 13.0 56.0 5.31 MB

:calendar: beautiful and eidetic date picker

Home Page: http://www.pigno.se/barn/PIGNOSE-Calendar

License: MIT License

JavaScript 85.92% Less 14.08%
calendar plugin jquery jquery-plugin moment datepicker datetime simple pretty design ui ui-components

pg-calendar'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  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

pg-calendar's Issues

languagePack chinese

pignose.calendar.js

weeks:
ch: ['日', '一', '二', '三', '四', '五', '六'],

monthsLong:
ch: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],

months:
ch: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],

Local Time Calendar Glitch

Hello Kennethan,
I noticed in our local time in the evening that the default date (blue circle day) would change to the next day even though it is still the 23rd today, not sure if it is a timezone issue but wanted to bring to your attention.
It shouldn't change until midnight.
timezone glitch calendar

Custom CSS and positioning

What is the best way to apply custom CSS (line heights, spacing, colors, and positioning) without having to write a WHOLE custom css?

Also I'm trying to position the calendar so it floats to the right or left but the width gets messed up. (I've tried putting it inside a holder div but same issues)

Initialized parameter doesn't work

Hi,

I'm trying to create a calendar without an initialized (selected) date. According to the documentation
(https://github.com/KennethanCeyer/pg-calendar/wiki/Documentation):

initialized
If this option is false, Calendar doesn't display active date at first time.
type: boolean
default: true
example:
$('.calendar').pignoseCalendar({
initialized: false
});

I've looked into Pignose's code and it seems that the option is called initialize (without the final "d"). There's an error in the documentation.

Cheers,
Oink!

wrong days position french

Hello Kennethan

I'm a French developer and I use your calendar and I like it but their is a problem.
When the language of the calendar is set on 'fr' for French the first day is 'Lundi' but on the other language the first day is 'Sunday'.
Here is the French version
firefox_2016-11-29_11-52-31

Here is the English version
firefox_2016-11-29_11-56-37

Has you can see with the French version all days are shifted by one day.

I found a solution of this issue if you want to correct the original script.
On the file pignose.calendar.js,
you need to change on line 184 the line :
fr: ['Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam', 'Dim'],

to the line :
fr: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'],

It would be great to add a function to choose the first day of the calendar if you have time :)

Thank you for your tool you help me a lot !

Multiple Weeks only works from Sunday ?

So I have the following options set to select a week at a time, and also for my weeks to start from a Monday, not a Sunday.

week:1,
pickWeeks:true,
multiple:true,

But if I select a week it still starts from the Sunday instead of the Monday. Giving a screenshot.
screenshot_20170712_171523

New translations

Hi. How about adding new translations? I mean russian and ukrainian languages.

Refresh Calendar Not working

Hi,
I have a ticket form where i am using the depart and return dates, i have two datepickers, when first change it cause the min date change to 2nd. I am using in select function and in apply function but it is not changing the dates in 2nd.
When change event call then i set new date limits and call like this.
var $btn2 = jq("#txtReturnDate").pignoseCalendar({
modal: true,
minDate: finaldate,
maxDate: maxDate,
select: function (date) {
$btn2.text(date);
}
});

how to untoggle date

For example 28th is toggled, after toggling on the 30th the 28th should be untoggled. How to accomplish this usecase?

bildschirmfoto 2016-11-16 um 08 09 43

PL strings

Weekdays
pl: ['Nie', 'Pon', 'Wto', 'Śro', 'Czw', 'Pią', 'Sob']
Months long
pl: ['Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopad', 'Grudzień']
Months short
pl: ['Sty', 'Lut', 'Mar', 'Kwi', 'Maj', 'Cze', 'Lip', 'Sie', 'Wrz', 'Paź', 'Lis', 'Gru']

No point in making a pull request for something so minor.
Great work on the plugin btw, it's superb.

How to disable multiple ranges (sequential, non-sequential)?

Please help me to disable dates while I got input as a range like 05-11-2016~23-11-2016.
Is there any way like this.. I know you have created minDate and maxDate but I used them already to disable past days from currentday. So I need Another spec to disable many ranges in one calender.. Hope you got my point.. right?? Just think of it, if there's a need to block multiple ranges by each update. Thanks.
$('.multi-select-calendar').pignoseCalendar({ format: 'DD-MM-YYYY', multiple: true, minDate: minDate, disabledDates: d_dates, select: onClickHandler, disabledWeekdays: [], disabledRange:['05-11-2016','23-11-2016'] }); as my disable range contains upper and lower bounds of the date range.

German Language Support

Some adjustments for german language support:

In title:
Deutsche -> Deutsch

Weekdays on the calendar:
MON -> MO
DIE -> DI
MIT -> MI
DON -> DO
FRE -> FR
SAM -> SA
SON -> SO

SAM and SON (SA, SO) should be red marked not SON and MON

bildschirmfoto 2016-11-02 um 20 59 54

Enable / Disable weekdays

An other question about enabling and disabling dates. How is it possible to disable some weekdays for ever. For example always disable saturday and sunday.
disableWeekdays: [6,7]

best regards
feldmarv

Error using toggle mode: dates not appearing afterwards

Hello.

When I use "toggle mode" and only select one date and afterwards I click "OK" date appear in input control. When I click the input control and calendar appears date is selected in calendar.

BUT, if I select more than one date, they do appear in input control but not again when the calendar appears next time. Dates are in input value but not initialized in calendar :'(
Thanks.

PD. Using last version

DateFormat to View before Pignose Calendar

Hello Kennethan,
Not sure if this is your scope of work but our current calendar format before it goes to Pignose shows the date as MMDDYY but I want it to show as DAYOFWEEK,MONTH,DATE,YEAR so that way it is universal and not confuse Europe/Asia date format
dateformat011717
Hope you can advice how best to see something like this before it goes to Pignose Calendar

Thanks

Customize Calendar For Persian Date?

Hi.
Thank you for great calendar. Your calendar is limited in several languages. I want customize your calendar for Persian date. How can I do this? or How do I change your code? You use moment.latest.min.js in your project, How can i use moment-with-locales.min.js in your code? of course this is better idea your calendar as much as possible to support all languages that will be excellent but if you help me I would be very grateful.
Thank you a lot.

Note: Persian calendar is little different with other calendar. In Persian calendar first day of week is Saturday and last day of week is Friday. First 6 month is 31 days and 5 second month is 30 days. in last month depending on whether it is a leap year or not, days can be 30 days or 29 days (If leap year --> 30 days, else 29 days).

Show events without click

Hi, I'm using the Calendar for show events but,
I need a way to signal visually in calendar when have event without click on the day.

See exemple:

captura de tela 2016-11-03 as 10 27 11

Thank you !

Italian traslation

weeks: {
it: ['Dom', 'Lun', 'Mar', 'Mer', 'Gio', 'Ven', 'Sab'],
},
monthsLong: {
it: ['Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre'],
},
months: {
it: ['Gen', 'Feb', 'Mar', 'Apr', 'Mag', 'Giu', 'Lug', 'Ago', 'Set', 'Ott', 'Nov', 'Dic'],
}

Prepopulated dates on start

Hi,
Went through all issues and documentation and can't believe no one need this, or I'm missing something.

I want to populate some dates on calendar page load. I can set one date as documented, but not multiple.
Set function was able to set only one too. Please shed some light on me. Thanks.

Problem with using multiple and disabledWeekdays

Hi Guys! I have problem when I want to use multiple option and disable Weekdays. Specifically, when active both option, I can't select multiple day correctly. For instance, Having selecting one day, the second day of selected range disable de firts day selected. My code is next:

$.ajax({
type: "POST",
url: "/Aparicion/GetDisabledDays",
data: { id: $('#concepto_idtarifa').val() }
}).done(function (data) {

    if (data != null) {

        Date.prototype.yyyymmdd = function () {
            var mm = this.getMonth() + 1;
            var dd = this.getDate();

            return [this.getFullYear(),
                    (mm > 9 ? '' : '0') + mm,
                    (dd > 9 ? '' : '0') + dd
            ].join('/');
        };

        $('.calendar').pignoseCalendar({
            disabledWeekdays: data,
            lang: 'es',
            multiple: false,
            format: 'DD-MM-YYYY',
            minDate: new Date().yyyymmdd(),
            select: onClickHandler
        });
    }

Thank you for the help!

Bug in Helper:Format keys for caching

The keys generated for caching in the Helper:Format are not always unique. In particular, if you format a date like (2017-1-21) and then format (2017-12-1), the second appears as a cache hit on the first. (Key is '{0}-{1}-{2}2017121' for both.) This should be solvable by just using a '+' for the join when creating the cache key, e.g.

var key = format + args.join('+');

resulting in '{0}-{1}-{2}2017+1+21' and ''{0}-{1}-{2}2017+12+1' as the two respective keys.

Enable date

How to add enabledDates feature in place of disabledDatesin jquery code??

Past Dates to Grey Out

Is there a way to not able to click previous days before today (minDate)? If so please show, thanks!

Date range selection can pass through disabled dates

I have a bunch of dates and use them to disable specific ranges in the calender. I use the same calender for selection, but it's possible to select "over" the disabled dates.

for example:
disabled range: 2017-01-10 to 2017-01-15
date start: 2017-01-05
date end: 2017-01-20

it's possible to select that in the first place -> not the greatest when it comes to usability.

Multiple with disabled ranges

Hey,

I have a "rangeDate is not defined" with options below

minDate: new Date(), disabledRanges: disabledRanges, format: 'DD.MM.YYYY', multiple: true,

disabledRanges — array [ [], [] ... [] ]

How I can to fix it?

Setting range and new language.

I would like an option to set a range of days to pick at once.

eg...

if you pick 2016-11-22 it'll automatically set the range to look like:
(5 days ahead): 2016-11-22 ~ 2016-11-27

so the people using the calendar don't have to pick two dates.

:: i've for my need added a new language to the plugin (da - Danish):

	var languagePack = {
		supports: ['en', 'ko', 'fr', 'ch', 'de', 'jp', 'pt', "da"],
		weeks: {
			en: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
			ko: ['일', '월', '화', '수', '목', '금', '토'],
			fr: ['Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam', 'Dim'],
			ch: ['日', '月', '火', '水', '木', '金', '土'],
			de: ['SO', 'MO', 'DI', 'MI', 'DO', 'FR', 'SA'],
			jp: ['日', '月', '火', '水', '木', '金', '土'],
			pt: ['Dom','Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
			da: ['Søn', 'Man', 'Tir', 'Ons', 'Tor', 'Fre', 'Lør'],
		},
		monthsLong: {
			en: ['January', 'February', 'March', 'April', 'May', 'Jun', 'July', 'August', 'September', 'October', 'November', 'December'],
			ko: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
			fr: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
			ch: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
			de: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
			jp: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
			pt: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
			da: ['Januar', 'Februar', 'Marts', 'April', 'Maj', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'December'],
		},
		months: {
			en: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
			ko: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
			fr: ['Jan', 'Fév', 'Mar', 'Avr', 'Mai', 'Juin', 'Juil', 'Aoû', 'Sep', 'Oct', 'Nov', 'Déc'],
			ch: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
			de: ['Jän', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
			jp: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
 			pt: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
			da: ['Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'],
		}
	};

How to get the selected date pls help!

Hi im a newbie of javascript, we have a project in capstone that needs an appointment scheduler and i am using this calendar as the datepicker but i dont know how to get the value selected. Pls help asap! thanks :)

Pignose calendar + input = ReferenceError: models is not defined

Hi!

When relating a calendar with an input as:

<input type="text" id="text-calendar" class="calendar" />

$(function() {
$('input.calendar').pignoseCalendar({
modal: true,
format: 'YYYY-MM-DD' // date format string. (2017-02-02)
});
});

I the user clicks on the input text box, pignose's modal appears, the user can now choose a date and the date is written into the input text box. So far so good.

If the user decides he wants a different date, if he clicks again on the input text box nothing happens. The Javascript console shows the following error message:

ReferenceError: models is not defined

This is true even in the example title Input type provided at:
https://www.pigno.se/barn/PIGNOSE-Calendar/

Is this the expected behaviour?

Thanks!

Added new light-blue theme and update icons fonts

Hey guys, I recently added some new features on my fork for its awesome calendar plugin. I hope that you are interesting in its. In other branch buggy, I also added some simple events support features used in my own project. Happy to help in any other matter!!

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.