apaajabolehd / react-native-range-datepicker

react native range datepicker inspired by Airbnb
84 stars 53 forks source link

Wrong Dates #16

Open shahbazmancho opened 6 years ago

shahbazmancho commented 6 years ago

I dont know if i am using the DatePicker in right way or not . Here is the result . when i try to get date it give some number which i am unable to understand

screen shot 2018-07-02 at 8 07 22 pm screen shot 2018-07-02 at 8 07 11 pm
frost4869 commented 6 years ago

@ShaBax it is your "untilDate" value in Unix TimeStamp Milisecond format truy convert it back to readable time here: https://www.epochconverter.com/

priyajainSE commented 5 years ago

@ShaBax I tried implementing the package but was unable to use. Can you brief on how you used this package?

HusseinElGanzory commented 5 years ago

@ShaBax I tried implementing the package but was unable to use. Can you brief on how you used this package?

 onConfirm= {(startDate, untilDate) => //alert( new Date(startDate).toLocaleDateString("en-US"))
          this.setState({ startDate:new Date(startDate).toLocaleDateString("en-US"), untilDate:new Date(untilDate).toLocaleDateString("en-US"), openDatepicker: false })

I use that it return correct date