Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

225
Views
Boostrap-datepicker format for traditional japan calendar

I got a problem from format datetime of bootstrap datepicker. I want to covert datetime to format: 2021(R3)/11 This is my config:

$('.datepicker').datepicker({
format: {
    toDisplay: function (date, format, language) {
        var d = new Date(date);
        const year = d.getFullYear()
        const month = ('0' + (date.getMonth() + 1)).slice(-2);
        const era = getEra(date)
        return `${year}(${era})/${month}`;
    }, 
    toValue: function (date, format, language) {
        return new Date(date);
    }
}})

But there something make ${era} variable disappear in result:

[Result when change data][1] [1]: https://i.stack.imgur.com/mmhIb.png

It's look like round brackets been detected by something and remove every thing inside.

Have you guy have any idea ?

P/S: getEra(...) just return string

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!