kineticsocial / angularjs-datetime-picker Goto Github PK
View Code? Open in Web Editor NEWAngularJS DateTime Picker Without JQuery and Bootstrap
License: MIT License
AngularJS DateTime Picker Without JQuery and Bootstrap
License: MIT License
in ie 11 the popup goes in bottom left of the page and become unresponsive and can't be closed
How to localize the date time picker ? Can u please help me
When I see into the code of the this module it has some line
$document[0].body.appendChild(datetimePickerEl);
I want to open up the datetime pickker on a modal boz which itself appends to the body. So when I use this library, the datetimepicker open up behind the modal box.
Is there any option to customize the appending of datetime picker component on an element other than document body.. I mean can't I give the parent element ref as an input paramter to its api to work like how we can give input paramneter for date format.
Error: [$injector:modulerr] Failed to instantiate module publicApp due to:
[$injector:modulerr] Failed to instantiate module angularjs-datetime-picker due to:
[$injector:nomod] Module 'angularjs-datetime-picker' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.5.5/$injector/nomod?p0=angularjs-datetime-picker
minErr/<@http://localhost:3000/lib/angular/angular.js:68:12
module/<@http://localhost:3000/lib/angular/angular.js:2070:1
ensure@http://localhost:3000/lib/angular/angular.js:1994:38
module@http://localhost:3000/lib/angular/angular.js:2068:1
loadModules/<@http://localhost:3000/lib/angular/angular.js:4564:22
forEach@http://localhost:3000/lib/angular/angular.js:322:11
loadModules@http://localhost:3000/lib/angular/angular.js:4548:5
loadModules/<@http://localhost:3000/lib/angular/angular.js:4565:40
forEach@http://localhost:3000/lib/angular/an
The css source in bower.json is missing:
"main": "angularjs-datetime-picker.js",
->
"main": [ "angularjs-datetime-picker.js", "angularjs-datetime-picker.css" ],
With this change it's easier to inject the file with browsersync.
@allenhwkim what is the status of this project? No commits made in 2016
Any plans for future? Maybe get more maintainers to help with pull requests?
As topic states the form properties is not affected when I choose a date (Google Chrome Version 50.0.2661.86 (64-bit))
Here's what I am trying to do:
<form name="form">
<input ng-model="model"
name="dateTime"
datetime-picker
date-format="yyyy-MM-dd HH:mm:ss"
close-on-select="true" />
<span ng-show="form.dateTime.$dirty" class="notice">{{ message }}</span>
</form>
The message only shows if I manually make some input to the field, not when choosing a date from the datetime-picker
I have not seen any information regarding minimum and maximum date. Is it possible to set the minimum and maximum date?
Implemented Timonly setup too
Error:
Uncaught Error: [$compile:tplrt] http://errors.angularjs.org/1.4.0/$compile/tplrt?p0=datetimePickerPopup&p1=
package.json syntax error - miss a comma before "homepage"
"devDependencies": {
"gulp": "^3.8.11",
"gulp-clean": "^0.3.1",
"gulp-concat": "^2.5.2",
"gulp-rename": "^1.2.2",
"gulp-strip-debug": "^1.0.2",
"gulp-uglify": "^1.2.0",
"run-sequence": "^1.1.0"
}
"homepage": "https://github.com/kineticsocial/angularjs-datetime-picker"
Pull request
#40
Hello I have a problem with datepicker in Internet Explorer 11. When I click to input, datepicker appears at the bottom of the page. Please tell how to update css for IE. Thanks
The datetimepicker doesnot open the pop-up in a modal.
Try using:
<input datetime-picker ng-model="testdate" date-format="MM/dd/yyyy HH:mm" hour="0" minute="0"/>
You will see it does not respect the defaults, but will substitute time with the current time.
Bower install loads .js file but not .css file. I believe it is because the package.json file is missing "angularjs-datetime-picker.css" in the main field.
{
"name": "angularjs-datetime-picker",
"version": "0.1.20",
"description": "Very Lightweight AngularJS DateTime Picker Without Using jQuery, bootStrap, or moment",
"main": "angularjs-datetime-picker.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
main only includes the .js file.
Great datetime picker!
Thanks
when i select a date and time from the date picker, the date is properly filled in the textbox.
but when i again click in the textbox to invoke the date picker, the current date time is set as selected in the date picker.
what could be the problem.
on the website the demo is working properly, but i have downloaded the same code, and it is not working on my machine.
I have added a class "selectable" to disable visibility of particular date item like this.
ng-class="{',
' selectable: getVisibility(today, mv, day),',
' selected: (day == selectedDay),',
' today: (today == (mv.year + \'-\' + (mv.month + 1) + \'-\' + day)),',
' weekend: (mv.leadingDays.length + day)%7 == 1 || (mv.leadingDays.length + day)%7 == 0',
' }"
and the function like this
scope.getVisibility = function(d, mv, day) {
if(scope.cusVal){
var temp = new Date(d);var futureDates = new Date(d);
temp.setDate(temp.getDate()-window.cusVal);
futureDates.setDate(futureDates.getDate());
return (temp <= new Date(mv.year + '-' + (mv.month + 1) + '-' + day) ? true : false) && (futureDates >= new Date(mv.year + '-' + (mv.month + 1) + '-' + day) ? true : false);
}else if(!scope.cusVal){
return (new Date(d) >= new Date(mv.year + '-' + (mv.month + 1) + '-' + day) ? true : false);
} else {
return (new Date(d) <= new Date(mv.year + '-' + (mv.month + 1) + '-' + day) ? true : false);
}
}
Currenlty, I am disabling either past dates or future dates but not specific date range.
How can I make visible only the past 30 days?
how can i add a callback function when user finish choose the date?
<input ng-model="date1" datetime-picker date-only future-only />
In above example future-only is not working.
Hi! Thanks for a great directive!
Here's a bug:
var minute = scope.minute || today.getMinutes();
If scope.minute
is zero, it will take today.getMinutes()
instead. So setting minute="0"
on the directive won't work.
Hi Guys,
I would need max date and min date option to restrict users from selecting unauthorized dates
angular.js:78 Uncaught Error: [$parse:syntax] Syntax Error: Token ':' not a primary expression at column 1 of the expression [::dayOfWeek.firstLetter] starting at [::dayOfWeek.firstLetter].
http://errors.angularjs.org/1.2.24/$parse/syntax?p0=%3A&p1=not%20a%20primar…ression&p2=1&p3=%3A%3AdayOfWeek.firstLetter&p4=%3A%3AdayOfWeek.firstLetter(anonymous function) @ angular.js:78throwError @ angular.js:10544primary @ angular.js:10519unary @ angular.js:10767multiplicative @ angular.js:10750additive @ angular.js:10741relational @ angular.js:10732equality @ angular.js:10723logicalAND @ angular.js:10714logicalOR @ angular.js:10702ternary @ angular.js:10686assignment @ angular.js:10669expression @ angular.js:10665filterChain @ angular.js:10631statements @ angular.js:10610parse @ angular.js:10494(anonymous function) @ angular.js:11305$interpolate @ angular.js:8782addTextInterpolateDirective @ angular.js:6959collectDirectives @ angular.js:6208compileNodes @ angular.js:6039compileNodes @ angular.js:6055compile @ angular.js:5976applyDirectivesToNode @ angular.js:6386compileNodes @ angular.js:6043compileNodes @ angular.js:6055compileNodes @ angular.js:6055compile @ angular.js:5976DatetimePickerCtrl.openDatetimePicker @ angularjs-datetime-picker.js:60open @ angularjs-datetime-picker.js:23(anonymous function) @ angularjs-datetime-picker.js:326
Year is taken in 1900 when using Short date format
I have this code inside modal(made by jquery, not angular-bootstrap lib)
<div class='input-group date datetimepicker'> <input type='text' class="form-control" datetime-picker ng-model="promo.time_from" date-format="yyyy-MM-dd HH:mm:ss"/> </div>
When i click on input there's no reaction. I'm looking at the end of page code, but there's no new elements, so this module is not reacting at all. ;/
I get following error when clicked on the text box
Uncaught Error: [ng:areq] http://errors.angularjs.org/1.4.8/ng/areq?p0=scope&p1=required
Can you please help?
Edited:
I tried to debug it and found out that this happens when debugInfoEnabled is set to false.
$compileProvider.debugInfoEnabled(false);
Is there a workaround for this?
Also i think it will be better to add a z-index for the element. thanks
Is there a way to open the datetime-picker popup window when using tab selection instead of on-click.
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.