allenwooooo / rc-datetime-picker Goto Github PK
View Code? Open in Web Editor NEWReact component for datetime picker by Moment.js
Home Page: https://allenwooooo.github.io/rc-datetime-picker/
License: MIT License
React component for datetime picker by Moment.js
Home Page: https://allenwooooo.github.io/rc-datetime-picker/
License: MIT License
How can I set time intervals 5min? Now it is 1min
How can I connect css?
Hi All –
I'm getting a deprecation WARNING. Any plan to fix-it?
backend.js:6 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
- Move data fetching code or side effects to componentDidUpdate.
- If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
- Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run
npx react-codemod rename-unsafe-lifecycles
in your project source folder.Please update the following components: Calendar, Day, Month, ReactSlider, Time, Year
I can't use onChangeRaw function in this library. I want to trigger some function after pick the date and time.
It's currently not really working smooth on a touch device (smartphone or laptop with touch screen)
hi, allen
we have a problem with react 15.4.0
Module not found: Error: Cannot resolve module 'react/lib/CSSPropertyOperations' in /home1/irteam/.jenkins/jobs/NFAS_WEB_ND/workspace/node_modules/rc-datetime-picker/dist
can you fix this problem ?
I currently use "Picker" with minPanel
prop to allow to display the component to select only years or months.
I have 2 issues with the actual implementation :
closeOnSelectDay
prop works only if dayPanel is the current one)onChange
is triggered each time I display a panel, even if the user does not make selection at all (ex navigatiin in years)I propose to take care of the minPanel
option to trigger change only when the min panel is the current one, and evaluate "closeOnSelect" under this condition.
Below is a diff of a possible implementation.
Are you open to a PR about this ?
//Trigger.jsx
handleChange = (moment, currentPanel) => {
- const {closeOnSelectDay, onChange} = this.props;
+ const {closeOnSelectDay, onChange, minPanel = 'day'} = this.props;
- if (currentPanel === 'day' && closeOnSelectDay) {
- this.setState({
- isOpen: false
- });
- }
+ if (currentPanel === minPanel {
+ if (closeOnSelectDay) {
+ this.setState({
+ isOpen: false
+ });
- onChange && onChange(moment);
- }
+ onChange && onChange(moment);
+ }
+ }
``
Can you add the feature to begin the week a monday ?
for example ?
In Popup Mode example: https://allenwooooo.github.io/rc-datetime-picker/
When we clear the date (with the Clear button), and then we want to set new date, date will not be set until we will set time. This is confusing, because naturally I firstly click on calendar day, then nothing happens, and then I use time picker and have to use calendar once more.
rc-datetime-picker/src/Trigger.jsx
Line 117 in 3d4468e
Or I can and I'm not seeing how? All I want to do is set DD/MM/YYYY HH:mm
like this:
<DatetimePickerTrigger
format='DD/MM/YYYY HH:mm'
weeks={weeks}
moment={this.state.date}
onChange={this.handleChangeDate}>
<input type="text" value={this.state.date.format('YYYY-MM-DD HH:mm')} readOnly/>
</DatetimePickerTrigger>
Awesome library! Thanks.
In addition to the current minDate
and maxDate
, it would be most welcome if the library also supported a minTime
and maxTime
. For example to disable reservations in the evenings.
Looks to me that the confirm button, but also the "Start Date" and "End Date" labels could be removed. Or we should at least be able to hide them?
Pls fix this one bug... months from props cant use now... @AllenWooooo pls check PR bellow
Hi there,
the umd isn´t available, would you be so kind and fix this? I really want to introduce this nice datetime-picker to my colleagues.
/*
Thanks in advance!
Greetings
David
Hi there,
Looking at your demo page, ( https://allenwooooo.github.io/rc-datetime-picker/ ) the default state of the hour/min sliders is 0/0 even if the time is set. Do you have a resolution/work-around for this?
Other than that, great module.... thanks! :)
Is there a way to set seconds as you set hours and minutes (with bars)?
I like the library very much, but using moment.js was a problem for us, so I made the project work with dayjs. I did not create a fork and open a Pull request because the two projects will proceed differently than each other. Also, this place has not been receiving updates for a long time.
Like minDate and maxDate property their must some property to disable weekends for different countries
This global style
can break consumer's markup in any place and it's hard to debug. Please do not use global styles.In parent component, when i click outside input DatetimePickerTrigger auto close, but in child component(that is a modal boostrap), i using DatetimePickerTrigger but when i click outside DatetimePickerTrigger not close. Anyone can help me ? thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.