jockmac22 / foundation_calendar_date_time_picker Goto Github PK
View Code? Open in Web Editor NEWCalendar: A date and time picker for the Foundation CSS framework.
Calendar: A date and time picker for the Foundation CSS framework.
Hi there, first of all, amazing work. Love how this looks in foundation. Question: Any way to prevent the time from being passed? When the form is submitted, even though I've used:
And the POST variable spits out:
mydate => string(19) 2014-12-16 03:31:46
Obviously I can just trim the output, but wondered if I found an issue that might help others.
Thanks again for all your work.
When you change the input value and trigger change
, the calendar should update with new date.
Hi there.
First of all, excellent job on the calendar plugin for the Foundation framework.
Can you please make the non minified version of the foundation_calendar.css file available?
Thank you very much for your plugin ๐
Cheers,
Bernardo
Second item, when selecting a date using fixed, the calendar disappears. I'm assuming it should stay showing the date selected. Any way to fix this?
Thanks again.
First off, let me add to the chorus: this is a great control! Thank you so much for sharing it with the community. I have a feature request that I think will make life a lot easier for the control's users.
Before I came across your project, I spent some time trying to implement the one at http://foundation-datepicker.peterbeno.com/example/example.html. It's nice, of course, but I found it to be a little finicky and it doesn't have the time picker. It does, however, have this feature where if you click the Month at the top of the calendar, you can cruise through months and years. This is much more efficient than clicking left, left, left, forever until you get where you need to be.
I'd like to see something like that in a future release of this project. :)
Thanks again!
The foundation_calendar.css keeps looking for grey-wood-bg.jpg.
http://localhost:3000/assets/grey-wood-bg.jpg 404 (Not Found)
First. Thank you very much for your work.
When trying to edit an appointment, the javascript isn't doing its work. To illustrate here is the start_date from the new form and edit form. The included javascript files are the same for both pages. The form is no different except there being value from the already scheduled date. Don't know how to contact you but the best way to reach me is on IRC. rubyonrails channel preferably. username : skinkitten OF course I will respond on here too. Let me know if more information is needed.
http://www.pasteall.org/51703/rails
http://imgur.com/PzHNMPH
Here's the app in action. edit : http://imgur.com/PzHNMPH && new : http://imgur.com/VKgq9ED
Aside error might mean something to you, I have no idea what it is. http://imgur.com/K2WRNeD && http://imgur.com/opupj1w
Got it working. I used the initial value that you graciously provided in the index.html. Thanks.
It would be great to have next and previous year in addition to next and previous month.
I see the header looking something like this (in ASCII):
<- Month -> <- Year ->
Month would be left aligned and Year right aligned. I know someone else proposed a full month/year date picker, but I think this would work just as well, and looks like it should be fairly easy to do based on my understanding of the code.
If you use data-time-format="%H:%M" on an input control, the time picker still displays seconds and AM/PM. If you specified "%H:%M %P", it should display the AM/PM in lower case (ideally).
Tiny buttons, success color, among other things were changed. I deleted everything not prefixed with .calendar in the css file and it seems to be working fine although this should not happen to start with!
It would be helpful to have a working demo that people can try out.
Jocko,
Great library! It certainly seems to be filling a need. I found an issue with it and I have a few suggestions for improvements. I'm a JS novice, otherwise I would do a PR and fix them myself.
The bug is when you have an open date or time picker, and you click on another date or time input, the old picker stays open. If you click on something other than a date or time input, the picker goes away as it should. Once you click on something else with multiple pickers open, they all close.
Thanks. I'll submit a couple of ideas in another ticket.
Hello,
If you set a value on your input, for example 2013-06-08 , the calendar highlights this day BUT it show the current month again, also if you click the "previous month" button it show the month before the month on our input...
Probably this is a bug , because i can see it on your demo also.
This is how to fix it.
On you foundation_calendar.js
at line around 261
you will find this
this.buildCalendar(opts);
this.buildTime(opts);
this.setFieldDate(opts, this.getFieldDate(opts));
this.updateTimePicker(opts);
The problem here is the order. Just move this.setFieldDate(opts, this.getFieldDate(opts));
before this.buildCalendar(opts);
like this
this.setFieldDate(opts, this.getFieldDate(opts));
this.buildCalendar(opts);
this.buildTime(opts);
this.updateTimePicker(opts);
Thanks for your awesome calendar . Great work.
Sorry for the spam. I am extremely dumb and i forgot to include the date.js dependency.
Sorry again :(
Hi,
It seems that the fix introduced in commit 51049cb actually breaks the calendar rendering both in Chrome and in Firefox.
Both browsers give the error:
Uncaught TypeError: function parse() { [native code] } is not a constructor
and the calendar is visualized only as a small blue line under the textfield. This happens only when I click on the field.
I am using the minimized js, and i am testing on a Mac.
Thanks!
I just discovered this project today. Very awesome! I've been looking for a solution for both Date and Time of Day for a while and this one is both functional and dead easy to setup.
Is there a way to have the date picker dismiss upon selection of a date. What about dismissing when the user presses the ESC key?
Thanks!
Sorry to be annoying, one question. How do I use the example code:
code>
script type="text/javascript">
$('#behaviorExample1').fcdp('bindBehavior', 'dateIsClickable', function(opts, addl_opts, response) {
// Check to see if we are rendering the dateIsClickable calendar input
return !addl_opts.is_weekend;
});
/script>
...to only allow Monday as selectable?
Thanks again
Provide a way to initialize datepicker by javaScript so that it can be invoked for dynamically loaded elements. I tried fcdp() but it doesn't seem to work.
Dear sir,
The Foundation calendar date- & timepicker works great on Chrome, but when I open the index.html in FF or Safari I get errors on both the date- and timepicker. When I try to change values I get 'NaN'. The timepicker ui standard gives NaN without changing anything. No further errors in the console.
Please help. Thanks!
Teun
Hi,
first of all thank you for your calendar: it is great :)
If you click on the next/previous month arrows, the visualized date will be also increased or decreased by one month, without actually clicking on a date.
I think it would be better not to update the visualized value until the user clicks on a new date.
The actual value passed to the form, the one in the hidden field, will not be updated though.
foundation_calendar.js:89
When an input box has a null value and the picker is nullable, the default value for the label should read '--'. Instead, it has today's date in it, but the input box is never updated. This means that it appears to have today's value, but actually is empty. Calling setWorkingDate here is the problem. Returning a new Date makes sense because it needs to use today's date to build the calendar, but the value isn't set, so the label should read '--'.
getWorkingDate: function(opts) {
var date_attr = opts.input.data('working-date');
if (!date_attr || ('' + date_attr).length == 0) {
date = new Date();
this.setWorkingDate(opts, date, true); // Problem
} else {
date = this.getDateFromString(date_attr);
}
return date;
},
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.