Skip to content
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

Updated 8/15! State of the picker and Version 6 #2326

Closed
Eonasdan opened this issue Oct 5, 2020 · 6 comments
Closed

Updated 8/15! State of the picker and Version 6 #2326

Eonasdan opened this issue Oct 5, 2020 · 6 comments

Comments

@Eonasdan
Copy link
Owner

Eonasdan commented Oct 5, 2020

Please read this blog post

There are currently 6 major tasks that will be happening as time allows.

  1. Merge Tempus Dominus Core and Tempus Dominus BS 4 together. This will be the base going forward. The TD projects will be EOL’d and remain untouched. I will probably archive those repos.

  2. Remove Bootstrap. Moving forward, BS won’t be a hard dependency. I’ll use a tool to grab the basic styles to generate a standalone css. The picker’s class names will probably stay the same. Hopefully, things will still look nice with BS5.

  3. Remove jQuery. This is going to be a challenge, as I mentioned during the stream to find all the places where jQuery chains are being used. A LOT of testing is going to need to be done here.

  4. Swap momentjs to dayjs. I realize this will be a difficult hurdle for some to either change or have a second datetime library. I think doing this now will be easier compared to later.

  5. (long term): Font Awesome 6. FA6 is in Alpha at the time of this update so it would be a good idea to prepare the default icons for this. Again, I know some people will still use older versions or Bootstrap Icons, but that’s what the options are for. :)

  6. (long term): Typescript. I started working on a jquery/bootstrap free typescript version a while back but it was a lot of work and never got it working right. I think a typescript version could happen after everything above is completed.

@Eonasdan Eonasdan pinned this issue Oct 5, 2020
Repository owner locked and limited conversation to collaborators Oct 5, 2020
@ghost ghost closed this as completed Nov 12, 2020
Repository owner deleted a comment Nov 12, 2020
@Eonasdan Eonasdan changed the title Please read this blog post https://eonasdan.com/state-of-my-picker State of the picker and Version 6 Nov 13, 2020
Repository owner unlocked this conversation Nov 13, 2020
@Eonasdan Eonasdan reopened this Nov 13, 2020
@Eonasdan
Copy link
Owner Author

Eonasdan commented Oct 6, 2021

Hello, if you haven't already I'd encourage you to read the part 2 blog post. I've c&p the task points below. I'd also suggest you that you join the discord. I'll try to be posting more updates there.

Task1: Repo cleanup. This is done. I've closed all the old issues (sorry if that was one of yours) and I added 2 projects in GitHub for the v6 tasks and the second is for a backlog of items I'd like to do but I'm not sure when those will come about.

Task2: Merging TD. This is also done. I merged together the Tempus Dominus Core and the Bootstrap 4 UI project. I merged a couple of good PRs into the BS4 version as well.

Task3: Remove Bootstrap. Update - I redid the tables to CSS Grid and it looks much better. I could still use someone who is willing to contribute design assistance to either the picker or the docs.

Task4: Remove jQuery. This is done! Man, that was a lot of jQuery my friends. Everything is native now. I'm using the latest JavaScript conventions in the code base. I created a separate file called jQuery.provider.js, so if you still want to do it the jQuery way, include this file along with the main script file.

Task5: Moment to Dayjs. Instead of doing this, I wrote a small date time library that extends the native Date object in javascript. This means there's no external dependency and I only carry around the functions that the picker actually uses. All of the options that previously took a Moment object now accept a Date or my DateTime object. When retrieving selected dates you will get a DateTime object that works just like a Date object.

Task6: FA6. At the time of this writing, FA 6 is still in beta and is only available with a pro subscription. I won't update the defaults until it's released to the public and the free icons are ready to use.

Task7: Typescript. As I was working on removing jQuery I was realizing how much of the code I'd have to rewrite to remove it. Waiting until later would have caused me to have to rewrite the code again in TS, so it just made sense to do it now. The picker's code is now completely in Typescript (except the jQuery plugin code). I'm currently using Rollup to translate this down to JS.

@tagliala
Copy link

Task6: FA6. At the time of this writing, FA 6 is still in beta and is only available with a pro subscription. I won't update the defaults until it's released to the public and the free icons are ready to use.

👋🏼 👋🏼

FA6 has been released :)

I've checked the icons defined at

time: 'fas fa-clock',
date: 'fas fa-calendar',
up: 'fas fa-arrow-up',
down: 'fas fa-arrow-down',
previous: 'fas fa-chevron-left',
next: 'fas fa-chevron-right',
today: 'fas fa-calendar-check',
clear: 'fas fa-trash',
close: 'fas fa-times',

and they are all available with the same syntax. Demos:

SVG: https://jsfiddle.net/tagliala/bfa6uhse/27/
CSS: http://jsfiddle.net/tagliala/4f8gp2wL/7/

@Eonasdan
Copy link
Owner Author

I have some pending code to make the change

@Eonasdan Eonasdan changed the title State of the picker and Version 6 Updated 8/15! State of the picker and Version 6 Aug 16, 2022
@Eonasdan
Copy link
Owner Author

It's finally here everyone! Version 6 is out!

The doc have had a make over. You might find some of your bookmarks get redirected to new pages. I split out the Options and Functions docs into more readable pages.

I created a REPL that replaced the example page. This embeds a StackBlitz project and I hope that it will more easily allow for you to view the example html/js. You might notice the hash in the URL when you click on an example. In the future, I will provide a way to "export" any changes you make from the example and the hash will always produce the same code.

My next cycle back to this project (normally in 3 weeks) will likely be focused on doc clean and that kind of thing. After that, I will be trying to fix more bugs and then look at some feature requests.

Thanks for sticking it out with me. The donations I've gotten have definitely made an impact and I thank those of you who have done that.

@fw-aaron
Copy link

fw-aaron commented Aug 16, 2022

Wow, congratulations! I am just maintaining a project using an old version of the datetimepicker (4.14.30), trying to set a "minimum" date, just read through your blog post, then came across this issue from Oct 2020, scroll down and "It's ready!" from a few hours ago! Way to go! I hope your health keeps getting stronger and you continue to enjoy coding. Rock on!

Edit: Yes! Found it! {minDate: Date.now()}. This old (https://github.com/Eonasdan/tempus-dominus/tree/d62e0ab9c7b9b40a9d530607eae54d2bd3959909 2015!) datetime picker is really amazing, I can't wait to use version 6!

@Eonasdan
Copy link
Owner Author

@fw-aaron there's a migration tool that should help you. In v6 bootstrap is no longer a dependency so in theory you should be able to use v6 with bootstrap 4/5

@Eonasdan Eonasdan unpinned this issue Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants