Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 23 10:22
    Tronic247 commented #6646
  • Jun 23 10:15
    Tronic247 commented #6615
  • Jun 23 10:14
    Tronic247 commented #6615
  • Jun 21 01:58
    jamesdwalker commented #6646
  • Jun 20 17:49
    rahultrivedi180 opened #6646
  • Jun 14 03:19
    luchillo17 commented #5396
  • Jun 14 03:18
    luchillo17 commented #5396
  • Jun 13 07:18
    krupall commented #6645
  • Jun 13 04:04
    axiaoxin opened #6645
  • Jun 08 20:30
    Cumbalin opened #6644
  • Jun 04 10:30
    Zaniyar commented #4655
  • Jun 04 10:28
    Zaniyar commented #4655
  • Jun 04 08:21
    pitichampi commented #2773
  • Jun 02 14:20

    acburst on gh-pages

    Patreon June (compare)

  • May 31 14:03
    Mayankgbrc commented #1376
  • May 31 14:03
    Mayankgbrc commented #1376
  • May 31 14:03
    Mayankgbrc commented #1376
  • May 27 09:19
    Sazzad226 commented #5346
  • May 27 09:18
    Sazzad226 commented #5346
  • May 27 09:18
    Sazzad226 commented #5346
seano-hub
@seano-hub
specifically line 8 of JS where im explicitly setting default date to past date.. what i want is that past date to be selected programmatically ONLY (indicating that this is what user selected last time) and only today and future dates available for selection by user.. and when user selects new date, that is one that will be selected.. so 2 dates will not be selected at same time..
Sean Doherty
@doughballs

@monster153 you are wrong on every level:

instances is always an array, and we access a specific instance by using the index.

.destroy() is a working function of 1.0.0

Check this pen, with logs and working tear-down:

https://codepen.io/doughballs/pen/MWyRGB

If you are set up differently (which it looks like you may be), then I would use the standard set up until it's working and then rework into your preferred project structure.

Sean Doherty
@doughballs
@seano-hub still not totally getting it, but it sounds like you want the default date to be in the past, but this in opposition to your minDate (which is always todays date)
seano-hub
@seano-hub
@doughballs yes that is correct.. so like TODAY on September 28 2020, i can select sep 28, 2020 and save it to db. when i open same date picker later tomorrow or anytime in future i want to show that current selected date is September 28 2020,so lets say user opens same date picker tomorrow and wants to change selected date, they HAVE to select date
that is either sep 29, 2020 or later
and as soon as user selects new date, old one will get replaced
so min date is to limit user from selecting past date.. but i dont want that to apply to default date because im setting that from old records..
Sean Doherty
@doughballs
@seano-hub as far as I know, you can't do this because of the conflict I mentioned - you want defaultDate to sometimes be earlier than minDate - impossible. I guess what you could do is hack the process - always show the selected date regardless of when it is (currently it's being overridden by minDate), and then set minDate once the picker opens. If user doesn't choose, you'd need to re-init with default date as the previously selected date. It seems like you need to sometimes set minDate, and sometimes not, depending on what the user is doing. Sorry if that's not much help. I never used pickers much..!
seano-hub
@seano-hub
@doughballs okay yeah i was thinking to use disableDayFn instead of min date and disable all days from default date to current date if default date < current date.. but that seems like it will go crazy if default date is last yr
thanks though
will see if i can do something hacky
monster153
@monster153
@doughballs the code pen link is not working
Sean Doherty
@doughballs
@monster153 it is working, it does exactly what I've told it to do - initialise, and then destroy. Comment out the destroy line, and the carousel will work as normal. It is at this point that you would re-initialise with your new options.

Sorry, you mean the actual link is incorrect, my typo:

https://codepen.io/doughballs/pen/MWyRGBY

monster153
@monster153
@doughballs ok understand why access instances with an index because you are using querySelectorAll i used querySelector
I tried your way i changed it to querySelectorAll and used instances[0] and still nothing
The thing i am trying to do is add slides and remove dynamically how would you do that maybe i am doing it wrongly
Sean Doherty
@doughballs
Straight after destroy, remove the slides, add the slides, then re-init. Should be that simple.
monster153
@monster153
Ok so does destroy affect the slider visually if i only did destroy ?
Sorry if am taking to much of time
monster153
@monster153
@doughballs if i remove all the carousel-item it gives me this error
Cannot read property 'clientWidth' of undefined
@doughballs so i can not do what you suggested
Sean Doherty
@doughballs
@monster153 it’s not trouble, I do not know the carousel very well (I tend to use Slick) but i will have a go at dynamically updating my codepen tomorrow as I like to understand M as much as possible 😀
monster153
@monster153
@doughballs bro that will be very helpful if you get it to work
i would really appreciate it
Sean Doherty
@doughballs
diptendunandi
@diptendunandi
Hello, I have some problems regarding the carousel. Please someone helps me. I would really appreciate it.
https://codepen.io/diptendu-nandi/pen/ExKzKdo
computerwiz12890
@computerwiz12890
So....we still have some users who use Internet Explorer 11 (I know I know.....🤢🤮) And it seems a couple randomly get 1 of 2 oddities:
image.png
Or this:
image.png
diptendunandi
@diptendunandi
@computerwiz12890 can you please help me? I have some problems regarding image in Carousel. Please help me I will appreciate it
computerwiz12890
@computerwiz12890
Looks like you got a mispelling...one class is "carouse". @diptendunandi. Also, not sure why you are using "<ul>" and "<li>" for the carousel. Look at the Materialize instructions, they use a "<div>" for the carousel control, and then each item inside is "<a>" elements, not "<li>".
Sean Doherty
@doughballs
@computerwiz12890 you using flex? IE has some problems with it. You'll need to look in inspector and you may get a clue as to what css is not being applied.
computerwiz12890
@computerwiz12890

I'm pretty sure I'm not using flex, since I'm not sure what that is. Heard of it, but not sure...

I've asked the person with the problem to leave it alone and call me next time it happens. A simple refresh makes it go away.

Sean Doherty
@doughballs
Guys any PHP people around?
Bikash Sahu
@bikash44
I have issue in https://materializecss.com/carousel.html.carousel is not woking in browser when i open is moblie device.
Sean Doherty
@doughballs
@bikash44 working fine for me on iPhone XR - what device are you using?
Bikash Sahu
@bikash44
@doughballs I have checked in all the device available in Chrome.
Capture.PNG
Sean Doherty
@doughballs
@bikash44 so that looks like Angular...
Bikash Sahu
@bikash44
yes
Sean Doherty
@doughballs
Remember to initialise every render. (nitialisation should be part of the render.)
Bikash Sahu
@bikash44
@doughballs Is there any change required in CSS ?
Sean Doherty
@doughballs
@bikash44 no, just js.
Bikash Sahu
@bikash44
@doughballs Is it possible to customize the Image slider because I want to add some text paragraph at bottom of image.
Sean Doherty
@doughballs

@bikash44 out of the box, that carousel is image only, but you can do what you like to it. I just put a h1 inside the <a>, with this css:

    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;

Which seemed to work. There is a carousel that has text already built in:

https://materializecss.com/carousel.html#special