dude, i have been researching for almost 3 hrs, saved my life!!
@anithasshenoy66622 жыл бұрын
This is far better than Bootstrap-datepicker. With bootstrap-datepicker , width of the control was very huge and some how I could not bring it to desired size. This is cute. Thank you so much. I had tried it yesterday, but didn't know how to initialize it. You made it simple. Thanks a lot.
@Kareszrk2 жыл бұрын
Thank you so much dude! I love it! My client was ordering me this thing and I literally found no info only your video! Thank you!
@anishsahani18243 жыл бұрын
Thank you so much... I had wasted more than 10 hours before coming to your video. This solved my problem... You saved my day :)
@ravenjs3 жыл бұрын
I'm so glad haaha xD
@mi59563 жыл бұрын
Thanks man, Flatpickr is horrible on explaining where to use config option, their documentation wasted 4 hours. but you explained it very well. thanks brother
@ravenjs3 жыл бұрын
haha, yea you're not wrong :)
@Toro-Tor2 жыл бұрын
Uhh man, THANK YOU for the great tip, this "thing" is fantastic !!! I've configured a Date &Timepicker just the way I wanted it. I will insert the css locally and style the colors a bit different - Now the next stage is to send this to an email
@vagabondideas9685 Жыл бұрын
Dud, You Rock! Thanks for sharing this!👍👍
@razvandragusin6634 Жыл бұрын
Thanks for sharing with us this amazing information! Keep it up :)
@Bersek-ups11 ай бұрын
Really thx, this save me, i really need it a datetime picker for firefox and this work, REALLY THX, u are a great person
@aV5d9nlUBQ96 ай бұрын
Proved to be useful. Thanks!
@movacthuz2 жыл бұрын
man, i've been searching for this as well.. thanks a lot!
@marcushagerstrand86893 жыл бұрын
Thank you so much! I almost gave up searching for this solution 😅
@ravenjs2 жыл бұрын
hahaha
@prabhchahal44923 жыл бұрын
Cant thank you enough. That was extremely helpful
@ravenjs3 жыл бұрын
thank you :)))
@stepsexpert84322 жыл бұрын
Great help Thanks a lot Dear! You saved me time
@randeepyasintha140 Жыл бұрын
Keep up the good work ma8.
@zukurinshi Жыл бұрын
Thanks for this tutorial really helped!
@tuantran43772 жыл бұрын
Does it have to work with bootstrap? I did exactly the same every step and it does not work. It only shows the regular datetime-local
@ravenjs2 жыл бұрын
No, it should work even with plain JS and CSS
@DarkLightBoy Жыл бұрын
did you find a fix for it, i have the same issue
@AlexandraIevtushenko2 жыл бұрын
God bless you, dude!
@iuriius2 жыл бұрын
thanks for this nice tutorial 🙏
@sheriffcrandy2 жыл бұрын
Man this is so dope man. Thank you bro! How can I extract each field for processing? I need to get the month, day and year as separate fields.
@TalhaAkhtar.Official Жыл бұрын
Thanks bro this really helps alot
@S-Lomar Жыл бұрын
Tahnk you for sharing ❤️💕♥️❤️♥️♥️💓❤️❤️❤️❤️💓💕💞💓💕
@CorlStream2 жыл бұрын
Thanks for this video! It helped me a lot!
@muttBunch Жыл бұрын
This is an amazing find. Thank you. I’m using the mdbootstrap library and it’s a huge mess. It doesn’t work correctly and you cannot get the value of the datetime input change.
@codingSparrow1433 ай бұрын
@RavenJS Hey!! This looks like a very good solution😊. But is there any way to have different time intervals for time? Like I want to have an half-hour difference between two times. e.g. 10:30, 11:00, 11:30..... and so on.
@carlotadias93352 жыл бұрын
I am trying to implement it in an angular project, but it doesn't recognize flatpickr("#myID", {}); even after putting the script as you did. it seems it asks for the npm install which I cannot do in this point (problems with lerna). do you know the alternative to import it without doing the npm install?
@ravenjs2 жыл бұрын
yes you could just include the script tag in the html without having to touch npm like you would with a plain JavaScript module. You can find the copyable script tag in the flatpickr docs
@carlotadias93352 жыл бұрын
@@ravenjs thank you
@pizzapanni2 жыл бұрын
My flatpickr looks ulgy like it's the browser default. How did you get yours to look so good?
@ravenjs2 жыл бұрын
did you include the css when importing flatpickr?
@pizzapanni2 жыл бұрын
Just noticed this comment after you've hearted it, i fixed the issue. It was using the default picker and not flatpickr.
@ladiran2 жыл бұрын
@@pizzapanni I have same issue! Please, how could I stop it from using the default time picker? I am using chrome browser. Thanks
@pizzapanni2 жыл бұрын
@@ladiran Sorry man, I wish I could help you though. It was so long ago that I don't even remember how I solved it. Hope you find a way!
@ladiran2 жыл бұрын
@@pizzapanni Thanks, all the same🙏
@mindiaarabuli94262 жыл бұрын
When I have open Inspect Element and refreshing page , The code no longer works :/
@bikramshrestha2196 Жыл бұрын
Also, is there a way to get the output date time in ISO:8601 format like 2023-07-28T09:30+00. currently it is showing as 2023-07-28 09:30 and one of the APIs i am using takes input in iso 8601 format
@AnaDrawzone2 жыл бұрын
Hello there! Do you know if this has dates avalibles in spanish??
@ravenjs2 жыл бұрын
Yes, I believe they are available in Spanish as well flatpickr.js.org/localization/
@DanielJoshua-ck3ui7 ай бұрын
Is it responsive for Al screen?
@ghaithguesmi58572 жыл бұрын
thank you brooo thank you very much
@Kieselsteo5 күн бұрын
Yo bro do you have any idea why its all messed up in the chrome browser. Its great but I cant change the year and I can only change the month forward because the arrows are on the same spot
@anjon-roy3 жыл бұрын
Thanks for the help. but I have a question I want to set a button when the user clicks on the button the calendar will show. is it possible?
@ravenjs3 жыл бұрын
Yes @Anjon Roy it is totally possible. See this section of the documentation where they've already given us a working example: flatpickr.js.org/examples/#flatpickr--external-elements
@anjon-roy3 жыл бұрын
@@ravenjs thank you so much
@ravenjs3 жыл бұрын
@@_shienister_ I did some debugging for you and here's what I found: Everything works until this part: formatDate: (date, format, locale) => { // locale can also be used return moment(date).format(format); } It means that you formatDate option dateConfig is faulty, you might wanna check your momentJS implementation. You'll also find that everything else works if you just comment this section out. Do let me know if this solved your issue.
@anithasshenoy66622 жыл бұрын
@Logicism, I used flatpicker and it is very good. However I am stuck with a serious issue. I am using mySql qith django to output data from database to html page. When retrieving date data, flatpicker only shows the year correctly. date and month defaults to january 1st. I found that MySql is outputing the data as (month. date, year) instead of standard month-date-year. This is messing with the actual display. I assume flatpicker is not able to read the mySql output correctly. Is there any way to correct this ? @UCLyyqt2S4Ydc47W7Hiw3x0w
@ravenjs2 жыл бұрын
yes it shouldn't be too hard a problem to solve. have you tried using any date parsers? Maybe something like Date.parse() developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse
@anithasshenoy66622 жыл бұрын
@@ravenjs Thanks for the idea. However it didn't work. But I made another code that works. Here it is $(function(){ let edate =new Date("{{ displayshop.entry_date }}") ; var newdt = edate.getFullYear() + "-" + (edate.getMonth() +1 ) + "-" + edate.getDate() ; document.getElementById("entry_date").value=newdt ; flatpickr("#entry_date", {dateFormat: "Y-m-d"}); });
@sulmedici Жыл бұрын
Sir can we use it to pick multiple dates?
@alexandergdansk2 жыл бұрын
Good job!
@Asaduzzaman21893 жыл бұрын
Thank you so, so much. Very helpful.
@ravenjs3 жыл бұрын
you're most welcme 😎
@bikramshrestha2196 Жыл бұрын
Is there a way to add hour to the time you set in the picker?
@michcalu2 жыл бұрын
That is a nice explanation, thanks. But do you know how to make it work when you have nested forms on the fly? When I add a form with a date input, fllapickr is inactive until I submit the form with new data in the new fields.
@MarkVoVN3 жыл бұрын
thanks dude, really helped me alot
@ravenjs3 жыл бұрын
you're most welcome
@suri50233 жыл бұрын
very helpful. thank you so much
@ravenjs3 жыл бұрын
I'm so glad it was helpful Soroush :)))
@nassimbendjillali37143 жыл бұрын
thank you so much sir this is what i need
@ravenjs3 жыл бұрын
glad it helped :))
@blairmottau3 жыл бұрын
thanks for the vid! super helpful :)
@ravenjs3 жыл бұрын
thank you too @Blair :)))
@renantibia92 Жыл бұрын
Congratulations on the video, it's a great way to customize the input date. I just wanted to know how I can change the language, is it possible?
@ryanhernandez83882 жыл бұрын
helped a lot man thanks!!
@temporari26062 жыл бұрын
bro can u make a add new table row ------> and flatpickr still working in (input type="date")
@electroe21433 жыл бұрын
Thank you so much for sharing this.
@ravenjs3 жыл бұрын
you're most welcome @Electro :))
@franciscodisanzo68163 жыл бұрын
Hi, thank you!! Just what I needed. Do you know if I can change the calendar language?
@ravenjs3 жыл бұрын
hi Francisco, sorry for the late reply! To change the language, you can add a property to the config object like so: config = { "locale": "ru" // locale for this instance only } The timestamp for when I'm making the config object: 3:33 Configuration Object You can find more details here: flatpickr.js.org/localization/
@franciscodisanzo68163 жыл бұрын
@@ravenjs hi, Thank you very much!! Thanks for replying!
@ravenjs3 жыл бұрын
@@franciscodisanzo6816 you're welcome :)
@mohdzulfadhli2 жыл бұрын
can i make it to only shows year?
@ravenjs2 жыл бұрын
Yep you definitely can. Use the formatting tokens from flatpickr: flatpickr.js.org/formatting/
@mohdzulfadhli2 жыл бұрын
@@ravenjs thanks but I mean pick only year without day and month. is it possible?
@labeebmahir3 жыл бұрын
Thank You. It was helpful
@ravenjs3 жыл бұрын
Glad it helped @Laheeb
@Lucas-gg9yb Жыл бұрын
Can i have it fixed in the page layout instead of showing it only when i click in the input?
@furqonqolbi Жыл бұрын
thank you
@srikarpuligilla5724 Жыл бұрын
how can use it in angular.........is it possible.
@lucasbrantes1 Жыл бұрын
i`am receiving this erros if-modal.js:24 There was a problem with the fetch operation: ReferenceError: flatpickr is not defined at showModal (otif-modal.js:45:5) at otif-modal.js:21:17 (
@fauzanganinurmaizal89582 жыл бұрын
thanks man its work
@gloriarolan78073 жыл бұрын
How to limit the date ?
@ravenjs3 жыл бұрын
You can use the minDate/maxDate properties in the configObject: flatpickr.js.org/examples/#mindate-and-maxdate Or, you can use the disable array property: flatpickr.js.org/examples/#disabling-dates
@paulopaulo16153 жыл бұрын
Apprecitaed! Subs
@ravenjs3 жыл бұрын
thanks Paulo :)))
@cristobaldelapiedra3 жыл бұрын
thank you very much
@ravenjs3 жыл бұрын
glad it helped :)
@flexairz2 жыл бұрын
Implementing this into a project and time was not selectable anymore.. did not work.
@excelshorts579711 ай бұрын
How to disable previous date, cursor: not-allowed for previous date
@morse19792 Жыл бұрын
Genial!
@carlosvesta3 жыл бұрын
Muito obrigado.
@ravenjs3 жыл бұрын
de nada @Carlos Vesta
@AbdullahKhan-fq5pp3 жыл бұрын
please share datetimepicker code with type text not date
@ravenjs3 жыл бұрын
do you mean a text input field?
@LowProfie_ Жыл бұрын
Mine is not working😢
@TheLKStar12 күн бұрын
This is 99% of the way there. Manual inputs get autocorrected when badly formatted dates are inputted, that's a really bad decision since the user may not notice a wrong date. Could not change this.