Comments (2)
Hi @razagill,
I would really advise no to use refs to get some values. And in general, this goes a little bit against one of the core React principles that is to avoid 2-way data binding. refs should only be used in very specific cases (http://facebook.github.io/react/docs/more-about-refs.html#cautions). I'll simply quote React's doc :
If you have not programmed several apps with React, your first inclination is usually going to be to try to use refs to "make things happen" in your app. If this is the case, take a moment and think more critically about where state should be owned in the component hierarchy. Often, it becomes clear that the proper place to "own" that state is at a higher level in the hierarchy. Placing the state there often eliminates any desire to use refs to "make things happen" – instead, the data flow will usually accomplish your goal.
from react-bootstrap-datetimepicker.
Got it. I think it just seemed so easy to just get the value from refs like we do from text controls etc, that I thought I'm actually missing something. Thanks for the clarification.
from react-bootstrap-datetimepicker.
Related Issues (20)
- when viewMode is months, would like to select only month and year from picker. HOT 1
- How could I add custom class to hightlight some specific dates.
- Uncaught TypeError Occur when click to choose datetime
- Do I need webpack just for using this?
- ParentComponent.jsx:21 Uncaught TypeError: this.setState is not a function
- Installed Glyphicon but still getting errors related
- This repo should be deprecated, there is a better fork. HOT 3
- New dist build
- How to change orientation of the calendar from left to right side of the icon? By default its left.
- add disabled option HOT 2
- How to use extraFormats option available in the docs?
- can it support Chinese
- overflow: auto;
- Run the examples is error
- Add weekdaysShort to DateTimePickerDays
- Warning: Failed prop type: Invalid prop `dateTime` supplied to `DateTimeField`.
- onFocus, onBlur events not working
- Uncaught TypeError: Cannot read property 'func' of undefined HOT 8
- Date/Time UTC
- Using with Redux Form Name attribute not set
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 react-bootstrap-datetimepicker.