Git Product home page Git Product logo

Comments (8)

nazar-pc avatar nazar-pc commented on August 22, 2024

pickmeup_twitter_bootstrap() actually accepts options as an argument, so you can use everything specified in the readme, including date.

from pickmeup.

nazar-pc avatar nazar-pc commented on August 22, 2024

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.

gbjbaanb avatar gbjbaanb commented on August 22, 2024

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.

nazar-pc avatar nazar-pc commented on August 22, 2024

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.

gbjbaanb avatar gbjbaanb commented on August 22, 2024

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.

nazar-pc avatar nazar-pc commented on August 22, 2024

Just iterate over elements on the page and apply it to each element with unique settings or add attribute as I mentioned.

from pickmeup.

gbjbaanb avatar gbjbaanb commented on August 22, 2024

why add these attributes, why not just read the value instead of duplicating the data?

from pickmeup.

nazar-pc avatar nazar-pc commented on August 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.