Skip to content

Commit

Permalink
fix: 초기값이 00시일 때 PM으로 표기되는 에러 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hamo-o committed Aug 31, 2024
1 parent a67fd7a commit ca640d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/wow-ui/src/components/Picker/PickerGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ const PickerGroup = ({
setSelectedDate,
label,
}: PickerGroupProps) => {
const hours = selectedDate?.getHours() || 12;
const hours = selectedDate?.getHours();
const [time, setTime] = useState<Time>({
isAM: selectedDate ? hours < 12 : true,
isAM: selectedDate && hours ? hours < 12 : true,
hour: selectedDate && hours && hours !== 12 ? hours % 12 : 12,
minute: selectedDate ? selectedDate.getMinutes() : 0,
});
Expand Down

0 comments on commit ca640d6

Please sign in to comment.