Comments (18)
Thanks! Yes, it's something in the works within the next couple builds
from pickadate.js.
+1
from pickadate.js.
+1
Something like the rounded "x" on the far right side of the input (similar to OSX search fields) might make a nice default.
from pickadate.js.
@timknight Ooh! Finding the right place to position it in was the issue I was having. I think this is the way to go :)
from pickadate.js.
@amsul I was playing with the concept and found that using the times (×) character and then just styling the link with 100% border radius with some little padding tweaks can pull it off for the most part. I hope it helps. Really looking forward to this added feature.
from pickadate.js.
Yeah that's what I had in mind.. But it seems like I've come across an issue.
It's important that I don't modify too much of the existing DOM by doing things like wrapping the input
element in a <span>
. It causes a whole bunch of issues with styling of siblings and children elements.
So this means there's no way to position it on the right side - relative to the width of the input field. I can base it on the demo styling which means it would look like this:
But without styling it looks this - which is unacceptable for a plugin that's meant to "work out of the box".
from pickadate.js.
I think it would be more suitable as an extension using the API. Similar to the "from" & "to" calendars.
from pickadate.js.
@amsul I was definitely wondering if there were going to be some positioning issues with that especially since it requires a relatively positioned container.
I think since this datepicker allows the user to change the state of an input field, it's important that they be able to reverse the change if they made a mistake. What about doing something simple and then create an advanced sample using the API? For instance... instead of the "X" on the input, perhaps the default "clear" button is within the popup itself if the field isn't blank? You could allow the button to be disabled through an option and have an example of what you did with the "X" in the documentation in case someone wants to use that to expand their own version.
from pickadate.js.
@timknight yes, I like that idea. I'll be working on a new build sometime next week. Thanks for the suggestions!
from pickadate.js.
Thanks @amsul. Suggestions are always the easy part... you have the tough job.
from pickadate.js.
So, I started out just fiddling around with a few ideas of how to fit another button onto the calendar. That lead me to re-write quite a bit of the CSS to make the picker more responsive and mobile friendly with more button(s).
I'd love to get some feedback.. Here's what it looks like: http://jsfiddle.net/amsul/ZVzSQ/4
from pickadate.js.
@amsul, nicely done! I like what you've done so far. The only thing that stuck out to me as strange was the calendar sliding up from the main window even in larger resolutions, but all-in-all a position progression toward responsiveness.
from pickadate.js.
+1 Really need a clear button. BTW amsul I'm looking into making pickadate work with 3 select boxes, any way we can communicate?
from pickadate.js.
I've been updating the script to add the clear button, but I need to resolve a few other issues alongside - so it'll all come as part of version 2.0 (since it will be significant update).
@TheSisb Sure, give me a shout at [email protected] :)
from pickadate.js.
@timknight I agree it looks a bit odd at first - I've actually grown to like it more. But for those who prefer the classic layout, I'm going to be adding it as a separate theme.
from pickadate.js.
I just managed to pushed out version 2.0 http://amsul.github.com/pickadate.js
And it has a clear button! :)
from pickadate.js.
Here's an example for custom styling: http://amsul.github.com/pickadate.js/docs.htm#api_clear
from pickadate.js.
Is it possible to remove the clear button?
from pickadate.js.
Related Issues (20)
- Rendering on input element v5
- Error when added two calendars on a single page
- BUG formatSubmit generates the invalid name, when used the HTML input's name as array
- Maintainer wanted HOT 4
- Translation
- Infinite loop occurs with `.set('max', -Infinity)`
- Event click error in indexOf property in picker.js file
- Date picker defaults to 2099 since Jan 1, 2022. HOT 1
- `getRealEventTarget` should use `Event.composedPath()` instead of `Event.path`
- iphone don't work
- Date picker can't display well when on click HOT 1
- time piker select 24:00 hour instead of am / pm
- pickatime with classic theme is broken on Chrome 107 HOT 10
- Legacy.js error with Microsoft Edge
- Pickatime does not always handle decimal minimum time
- Hi, I cant seem to make it work on React?
- Time picker activates on repeated onRender HOT 1
- Dynamically disabling dates with data from server as user interacts with calendar: Allow disable {from: -Infinity, to: Infinity} or Prevent cascading changes when set disable when the currently selected item object becomes disabled (for DATES)
- Change language dynamically
- pickadate is using deprecated Jquery functions
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 pickadate.js.