-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calendar/DateTimePicker Component #908
Comments
Hmm. I know the pains of a missing date/time component as we've had to build our own in our apps. I've also seen this issue in SUI core, though, I had not seen the third party module. I'd like to clear my head first of my initial reservations (thinking out loud):
My initial reaction here is that we do not add this exact component as an addon. Though, I think I'm up for adding a date/time picker that is inspired by this one but also takes some cues from Jack's comments and some other great date/time pickers. All the date pickers below have things in common that are missing in the 3rd party SUI module. Most obvious to me are showing two calendars in one popup and highlighting the range of dates. Also, they feel much smoother whereas the experience of the 3rd party SUI module, IMHO, feels a little cluttered/jarring:
I believe the cluttered/jarring issues can be solved by removing the table borders and maintaining the same size element as the content changes. As far as the CSS issue, I have an unpublicised goal of supporting simplified SUI theme builds in this project somehow. I have several ideas on this but the end goal is to allow customization of component variables and overrides and the ability to include only the stylesheets for the components you are using. If I get into gear on this, the date/time component CSS would not be an issue as we'd have a standardized and documented way to generate CSS, including for addons. That is my brain dump for now. LMK your thoughts. |
Personally, I'd love to see this calendar/datepicker component officially brought into SUI-core. Then we could implement the same functionality to keep this lib 1-1 with core 🎉 @jlukic - I'd love your thoughts on the SUI-calendar add-on, specifically what's missing and what would it take for it to be absorbed into SUI-core. Judging from that original issue, there's a ton of community interest in it. And I obviously can't speak for @mdehoog but looking through that issue/PR he has seemed pretty amenable to feedback on improvements. @levithomason - to your feedback: Date Range
Multiple months at a time
This is more of CSS issue and could be solved customizing your build via Also one thing not mentioned above but that's pretty important for my use-case is the timepicker portion. I've tested many different React date/time picker libraries and I think this is the easiest and most intuitive time picking implementation I've seen. |
Well, I have no strong reservations against it. The initial addon can do as you suggested and give a heads up message that they'll need to include the 3rd party repo. Perhaps getting in our project will help bring some more activity and standardization to it, possibly even help if land in SUI core. |
To be clear, I've labeled this as |
@jcarbo Thanks for pointing out the Airbnb react-dates, it almost fulfills all the user cases, especially for mobile devices. |
I think that the work on the implementing of our own calendar is very However, calendar/picker component is very needful UI component. I'm using in my app react-day-picker, my goals are reached there: Looks that there no chance for SUI calendar in near future, so we can implement own calendar in separate repo that will contain CSS. |
I like the idea of not including CSS here. I have longer term goals for CSS I'd like to implement, someday, time permitting (#1009). I know Jack is not planning on doing more than 10-30 issues of maintenance a month on SUI core, so there is little chance of any big improvements coming there. This is also what makes me think we should consider a long term CSS solution. SUI core CSS doesn't really have a plan or team behind it. At the pace we're moving, I think it is going to make sense at some point to manage our own CSS as well. |
@jcarbo would you mind sharing the example how you used Semantic-UI-Calendar with a custom component? I think in general it would be great if there are some good workaround examples available until there's a native component provided. Almost every application we build needs a date picker some where :) For example, if someone created some custom css to style react-day-picker (or any other datepicker library) to make it look somewhat semantic-ui-ish, it would be quite helpful. |
@sagax85 - Just copy/pasted into a gist: https://gist.github.com/jcarbo/2f55ad9bf40f146b21e7c64327e9484c As mentioned in the description, there's some ugliness needed to workaround the fact that SUI-calendar is using jquery to update the DOM outside of React. Also, SUI-calendar doesn't do a proper module export so there's some ugliness needed to require it appropriately. Some other notes:
Hope this helps! |
thanks a lot @jcarbo :) |
@levithomason is the requirement for a new calendar component still on? i'd love to help out in creating a new component. |
This component can be developed here in this repo for convenience, then, once complete we can move it to a separate repo. Whoever starts work on it please leave a comment here so others know not to work on it in duplicate. |
Just dropping some thoughts here if I may: |
Thanks for the comments. One clarification, After your notes, I'm now entertaining the idea of having separate components, one for dates (calendar) and one for times. This would help with tests and features. If needed, we could also then wrap these in a date+time picker with ideal options exposed. Food for thought at least. |
Although, I'm fairly new to this repo, I'm happy to help out. |
A temporary solution https://www.npmjs.com/package/react-datepicker |
@joaohenriquepda Did you tested react-datepicker component, does it works? |
@jcarbo Hello! Could you please describe why
is a problem? I used |
@bintoll http://react.semantic-ui.com/introduction#jquery-free. You can get away with it in some cases, but it will bite you eventually. |
@levithomason Thank you! Now i understand. Also thanks @jcarbo for example of usage. Hope someone who knows the subject good will port this lib to react. |
I am officially putting my name down then.... I'm doing it... |
Go @harel! |
@harel @levithomason any idea if this will also be themeable? |
@nomadus The best way to move things forward is to take helpful action. |
I assume there still isn't any progress on this.. however in my travels i came across this. repo => https://github.com/YouCanBookMe/react-datetime SUI React has a lovely extensible form component for custom controls
then you can style with css to match your theme like all other custom styles. however i would like to see this as part of native SUI... ill add it to my giant list of things to do ;) |
Very cool. Someday, I'm supposed to finish #1240. I'm quite embarrassed about the timeline there. My time has gotten away from me on that one. |
if you want some inspiration: https://ant.design/components/date-picker/ |
Actually, I need available time :) Thanks for the reference anyway. |
tell me about it, im backlogged on my main project which is why i haven't been able to contribute more to this or the theme stuff we talked about. |
So, while this gets worked on, what is the current best Datepicker that fits into a Semantic-UI form without looking too out of place?? |
I'm giving this a try: https://developer.microsoft.com/en-us/fabric#/components/datepicker |
This one works ok, but the CSS are a mess... |
any updates on this yet? |
This component has little chance of making it. Many people want it, but not quite enough to finish it. I've locked the original issue as it is a frenzy of requests (and sometimes demands!) for updates and completion. This project is not funded, but, it is open source! I would encourage the most interested and needy parties to fork the repo, pick up the work where it was last left off, and bring it to the finish line. You'd make a whole lot of people really happy 😄 |
Here i'm trying to implement above mentioned https://github.com/mdehoog/Semantic-UI-Calendar |
I just created a css free, jquery free, responsive, react semantic datetime picker using momentjs for localization, no translation needed |
@Charlicus, looks like not support date-range selection? |
@levithomason Since Stardust is underway and in collaboration with Microsoft Teams/Fabric teams and the Fabric team has already created a beautiful datepicker. Wouldn't it make sense to incorporate it into Stardust/SUIv2 and SUIv1? |
@gaui Indeed. There will be a date / time picker in Stardust. It is a little more difficult getting these things into Semantic UI React v1 because we don't own the CSS. That is owned by Semantic UI (jquery). We just consume the styles as CSS classes. 📖 Stardust, Fabric, and Semantic UI ReactStardust's primary objective is to bring framework agnostic standardization and convergence to UIs in the areas of design language, accessibility, styling, and state management. This will include tools and utilities for library authors. Stardust's React components exist only as an exemplar of a Stardust compliant UI. Both Fabric and Semantic UI React will implement Stardust's standards and utilities. We are aiming for convergence in the future. It is a longer term goal, but we are working very actively on it. We meet in person twice a week to work toward this. It would be superb to one day be able to mix and match components from different libraries and give a high-quality and consistent experience to developers and end users. There is a bigger story here that will be documented and presented by Stardust UI in the near future. |
There has been no activity in this thread for 180 days. While we care about every issue and we’d love to see this fixed, the core team’s time is limited so we have to focus our attention on the issues that are most pressing. Therefore, we will likely not be able to get to this one. However, PRs for this issue will of course be accepted and welcome! If there is no more activity in the next 180 days, this issue will be closed automatically for housekeeping. To prevent this, simply leave a reply here. Thanks! |
bump |
I find it strange that this issue does not have a high priority on the backlog of items. Seems like a basic use case to cover? Edit - I'm using https://www.npmjs.com/package/semantic-ui-calendar-react for now, seems very nice! In case it helps somebody looking for an alternative these days. |
There has been no activity in this thread for 180 days. While we care about every issue and we’d love to see this fixed, the core team’s time is limited so we have to focus our attention on the issues that are most pressing. Therefore, we will likely not be able to get to this one. However, PRs for this issue will of course be accepted and welcome! If there is no more activity in the next 180 days, this issue will be closed automatically for housekeeping. To prevent this, simply leave a reply here. Thanks! |
Any news about that one? |
I'm interested in a standardized date/time picker as well as a schedule component (i.e. a day-week-month view of schedule/calendar items). |
There was a long-standing issue in SUI-core (Semantic-Org/Semantic-UI#3256) to add a date picker component. @mdehoog opened a PR but never made it into SUI-core, so it eventually turned into a third-party plugin https://github.com/mdehoog/Semantic-UI-Calendar.
I'm currently using this plugin in my React app and it's awesome! Given that it's built using existing SUI components (popup, table, label, icon) it fits right in.
The downsides is that, since it's using SUI-core, it brings in jQuery as a dependency 😐 Also given that it's jQuery-based it a little difficult to fit into the React world. I wound up wrapping it with an internal component to abstract some of the complexity, but ideally I wouldn't have to do that.
I think this may be something we could implement in this library as an add-on. The one thing I'm not sure how we'll want to handle is the CSS. The plugin mostly uses default SUI styles, but does have it's own LESS styling (definition/overrides/variables). I'm thinking we could just add the minified css on the docs site and include a "Heads up!" in the documentation for this component that you'd have to add the styles to your build manually
@levithomason - would love to get your thoughts here!
The text was updated successfully, but these errors were encountered: