Coder Social home page Coder Social logo

Comments (8)

wojtekmaj avatar wojtekmaj commented on May 31, 2024 8

@nikolas formatShortWeekday should be the way to go. The easiest solution in your case would be something like
formatShortWeekday={value => ['S', 'M', 'T', 'W', 'T', 'F', 'S'][value.getDay()]}

from react-calendar.

nikolas avatar nikolas commented on May 31, 2024 1

thanks, i got it! ^_^

from react-calendar.

wojtekmaj avatar wojtekmaj commented on May 31, 2024 1

Sure. They are capitalized by CSS only, so you just have to overwrite the default styling.

from react-calendar.

wojtekmaj avatar wojtekmaj commented on May 31, 2024

Yes, your assumptions are correct. I'll make sure to make documentation clearer :) Thanks for suggestion.

from react-calendar.

nikolas avatar nikolas commented on May 31, 2024

Same problem here, I'm just trying to make the day names display as the first letter rather than the first three, and this is unclear from the documentation.

from react-calendar.

Alek-S avatar Alek-S commented on May 31, 2024

Hey, I got a related question. I'm doing

formatShortWeekday = { value => ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'][value.getDay()]}

but it gets formatted into all caps to MO TU WE TH FR SA SU

is there a way to get it to retain capitalization fed in with formatShortWeekday?

from react-calendar.

Chusynuk avatar Chusynuk commented on May 31, 2024

Hi, I have a doubt about formatShortWeekday also. Idk why but all languages are working nicely, but Portuguese is the only language which shows the whole weekday word , trying this

() => new Intl.DateTimeFormat(localeLang, { weekday: 'short' }).format(date).substring(0, 3)

localeLang and date are a dynamic variables

but not success. Any ideas?

Screenshot 2019-11-25 at 16 40 59

from react-calendar.

akhilaudable avatar akhilaudable commented on May 31, 2024

@nikolas formatShortWeekday should be the way to go. The easiest solution in your case would be something like
formatShortWeekday={value => ['S', 'M', 'T', 'W', 'T', 'F', 'S'][value.getDay()]}

How to use it in the "Calendar" ?

from react-calendar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.