Comments (11)
could you share the code you are using?
from angular-datepicker.
I implemented the datepicker just as you show on the demo, using Angular 1.1.5 and jQuery, everything works as its supposed to but i want to have the datepicker inside a popover form, right now the datepicker only disappears when the input that displays the datepicker triggers the blur event, so if a have the datepicker inside a popover the form width is to small and the user could click outside of the popover and dismiss the whole form instead of just dismiss the datepicker. What i want to do is dismiss only the datepicker when user already has selected a date without having to trigger the inputs blur event.
from angular-datepicker.
in the example here https://github.com/g00fy-/angular-datepicker/blob/dev/app/index.html I am using angular-ui
for convenience.
you are still able to use ng-click
and other events, so you may want to do $event.preventDefault()
if you wish.
<div class="dropdown-menu" ng-click="$event.preventDefault();$event.stopPropagation()">
<div date-picker="date"></div>
</div>
``
I would be able to help to help you more if you could provide some code example.
from angular-datepicker.
Check this plunker http://plnkr.co/edit/6HBUaKWwTY8aYXYAIYto?p=preview
Take a look at the first input, i need an input just like that one, but as you can see when you select a date the calendar it still open, what i want is to remove the calendar when the user already select a date and if the user clicks again the input i want to display the calendar again.
The ng-click event of every td element of the calendar is already in use by the functions that you created, i tried removing the calendar inside those functions by triggering the blur event of the input but that didnt work for me.
from angular-datepicker.
+1 on this. I too would be thankful if widget closes after clicking on date in calendar.
from angular-datepicker.
Currently this can be achieved by having onchange
that would trigger blur
on the input.
Need to decide whether I should add another attribute like dismiss="true"
or find a different solution.
Any suggestions?
from angular-datepicker.
Once I saw configuration of a Directive via value
service:
angular.module('foo', [])
.value('config', { dismiss:true })
.directive('dateTime', function(config){
var options = _.extend(defaults, config)
...
})
Maybe there is a way how to use this config object optionaly. If user doesn't provide one, only defaults are used.
from angular-datepicker.
I like @srigi's approach. Definitely would like to have some sort of mechanism to dismiss the date picker too.
from angular-datepicker.
1.0.0
has config with dismiss, and accepts dismiss="true" param
from angular-datepicker.
I like the way you can configure the dismiss param.
It seems there is a probleme still with this feature.
Once you configure dismiss to true, each time you select a element (year, month, day, ...) the calendar close.
It should close only at the end of the workflow :
- date picker : close after day selection
- date-time picker : close after minute
from angular-datepicker.
AFAIR it closes at the end of workflow, which is the last view avaiable.
Will investigate!
2013/10/15 Romain Gonord [email protected]
I like the way you can configure the dismiss param.
It seems there is a probleme still with this feature.
Once you configure dismiss to true, each time you select a element (year,
month, day, ...) the calendar close.
It should close only at the end of the workflow :
- date picker = close after day selection
- date-time picker : close after minute
—
Reply to this email directly or view it on GitHubhttps://github.com/g00fy-/angular-datepicker/issues/6#issuecomment-26317501
.
Pozdrawiam
from angular-datepicker.
Related Issues (20)
- Unable to make default empty field while page load or state change.
- Angular DatePicker - Unable to get the accurate date in controller HOT 1
- can not set locale with webpack HOT 1
- Updating Calendar on input change HOT 6
- Update npm version HOT 12
- i can't able to select month and year after selecting date HOT 1
- After any event or any error massage than date field become empty
- ng-change is not working HOT 3
- Wrong repo :X
- document
- Years between 0001 and 0100 can't be picked and can't navigate to years before 1900
- ie8下不好使
- Fired change date event
- model.getFullYear is not a function
- First Day of Week is Incorrect HOT 2
- Popup top attr
- ng-model not working HOT 1
- Uncaught ReferenceError: angular is not defined HOT 3
- min-date doesn`t refresh
- max-date is not working properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-datepicker.