Coder Social home page Coder Social logo

react-appointment-picker's Issues

Displaying time in GMT instead of local timezone on IOS device

Hi There,
This component works perfectly on the Chrome, Firefox mobile emulators perfectly.
But when i check it on the real mobile device it is showing as Invalid date.
My gut feeling is it is due to you are using normal date object whereas IOS specifically needs ISO date format. Can you please look into this?

Change time and date format

Hi. i have problem to change locale setting. ```
` useEffect(() => {
if (date != null) {
const initialDate = new Date(
date.getFullYear(),
date.getMonth(),
date.getDate(),
15,
0,
0
);

  console.log("getting appointments");
  getAppointmentDays(date).then((days) => {
    setAppointment(
      <AppointmentPicker
        addAppointmentCallback={addAppointmentCallbackContinuousCase}
        removeAppointmentCallback={removeAppointmentCallbackContinuousCase}
        initialDay={initialDate}
        days={days}
        maxReservableAppointments={1}
        visible
        selectedByDefault
        unitTime={3600000}
        loading={loading}
        continuous
        locale={tr}
        
           />
    );
  });
}

}, [date, loading]);`

` return (
    <Container fluid>
      <Row>
        <Col xs={7} md={6}>
          <DayPicker
            locale={tr}
            weekStartsOn={1}
            mode="single"
            selected={date}
            onDayClick={(date) =>
              setDate(new Date(date.getTime() + 180 * 60 * 1000))
            } // utc saat ayarı çok uğraştık sonunda bulduk
            // modifiers={modifiers}
          />
        </Col>
        <Col xs={5} md={6}>
          {appointment}
        </Col>
        <button id="save-button">Publish</button>
      </Row>
    </Container>
  );`
data picker changed to local but appointmen picker doesn't change.
i want to change 24 h and yyyy-mm-dd date format. How can i do it? 

selectedByDefault not working with functional components

Hi,

I'm facing issue with selectedByDefault when using functional components.
I'm fetching the data using useContext hook, and setting days prop with useEffect, The isSelected dosen't affected in picker.

The isReserved works fine.

One exclusive appointment

Could be an option, like if we set the maxReservableAppointments to 0, that only one appoitment is acceptable, when we click on another apointment, it automaticallys remove the first one.
I was trying to made that change, but I'm still too newbie in JS.

Thanks!

How can i start the schedule earlier than 9AM?

Hi Roger,
Thanks for the component. It really fits the bill for my app.
Below is not an issue but more of requests.

  1. Is it possible to pass the start time of the schedule via parameter? not always starting at 9
  2. Is it possible to have prev and next button, with which user can view data for next week or prev week?

Thanks much
Vikram

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.