Comments (8)
pickmeup_twitter_bootstrap()
actually accepts options as an argument, so you can use everything specified in the readme, including date
.
from pickmeup.
Also bootstrap integration doesn't mean you don't have full access to all features, it just adjusts styling according to current bootstrap theme in use.
from pickmeup.
I want it to initialise with the date contained in the input element. not to initialise the picker with a date by reading it from the input element and setting it using the date option in javascript.
This is because I expect the date to be automatically initialised from the input field the picker is attached to (as this would be expected functionality). If I use the picker to select a date, and then re-open it, I would expect the date previously chosen to be in the picker, not the original.
The bootstrap integration is initialised by attaching the picker to a selector, so there is no easy way to initialise it with options based on the elements it gets attached to - eg if you call $('.pickerclass').pickmeup_twitter_bootstrap(), there's no way to say to it "this is the date that each element contains at startup".
from pickmeup.
Yeah, I agree it should have been initialized from the field it is attached to. Currently you can also use data-pmu-
attributes to set initial date. For instance data-pmu-date="01-01-2001"
should work.
I'll leave supporting input as a special case as potential improvement.
from pickmeup.
I tried to update the js to handle it, but I couldn't quite figure out where it shoudl be put, and what the interaction between (IIRC) options.current, default_date and date variables were.
from pickmeup.
Just iterate over elements on the page and apply it to each element with unique settings or add attribute as I mentioned.
from pickmeup.
why add these attributes, why not just read the value instead of duplicating the data?
from pickmeup.
That is the way it works in currently release version, it doesn't treat input
element as a special case and often used in custom complex interfaces where everything is initialized with JavaScript anyway. PR with input[value]
support is welcome though.
from pickmeup.
Related Issues (20)
- How to clear input value after selecting date HOT 4
- How to add header and footer in datepicker box HOT 1
- How to disable the Selection? HOT 1
- Allow ranges using two input fields instead of one HOT 2
- Highlight dates in between range on mouse over HOT 3
- set_date should override default_date
- get_date returns 'undefined' after '.clear()'
- invalid check "date instanceof Number" HOT 2
- Incorrect calendar appearance after clearing the field HOT 2
- Disambiguation of two-digit years HOT 1
- problem in wordpress, HOT 1
- Show price label in calendar HOT 1
- Add composer.json file HOT 1
- Async userdata loading HOT 2
- Настройка календаря HOT 1
- Bootstrap update for v4 HOT 2
- Add footer HOT 2
- For Two textboxes it is coming(i.e.., for the first and the fourth) and i want only for fourth one to be a date picker HOT 4
- not works for multi date inputs HOT 1
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 pickmeup.