Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AppUms_Lecturer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tungnq
AppUms_Lecturer
Commits
366d8116
Commit
366d8116
authored
Aug 25, 2025
by
tungnq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TODO: Bổ sung chức năng xác định ngày hiện tại tôn chữ màu xanh
parent
e5a34df6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
7 deletions
+42
-7
view.js
src/screens/class_schedule/filterWeek/view.js
+42
-7
No files found.
src/screens/class_schedule/filterWeek/view.js
View file @
366d8116
...
...
@@ -84,7 +84,14 @@ const FilterWeekView = ({ navigation }) => {
},
];
};
const
isToday
=
(
someDate
)
=>
{
const
today
=
new
Date
();
return
(
someDate
.
getDate
()
===
today
.
getDate
()
&&
someDate
.
getMonth
()
===
today
.
getMonth
()
&&
someDate
.
getFullYear
()
===
today
.
getFullYear
()
);
};
const
mockEvents
=
createMockEvents
();
const
formatDateToString
=
(
date
)
=>
{
...
...
@@ -219,12 +226,29 @@ const FilterWeekView = ({ navigation }) => {
return
(
<
View
style
=
{
styles
.
weekHeaderContainer
}
>
<
View
style
=
{
styles
.
timeColumnHeader
}
/
>
{
weekDates
.
map
((
date
,
index
)
=>
(
<
View
key
=
{
index
}
style
=
{
styles
.
dayHeaderCell
}
>
<
Text
style
=
{
styles
.
dayHeaderText
}
>
{
getDayName
(
date
)}
<
/Text
>
<
Text
style
=
{
styles
.
dayHeaderNumber
}
>
{
date
.
getDate
()}
<
/Text
>
<
/View
>
))}
{
weekDates
.
map
((
date
,
index
)
=>
{
const
isCurrentDay
=
isToday
(
date
);
// Gọi hàm kiểm tra
return
(
<
View
key
=
{
index
}
style
=
{
styles
.
dayHeaderCell
}
>
<
Text
style
=
{[
styles
.
dayHeaderText
,
isCurrentDay
&&
styles
.
dayHeaderTextToday
]}
>
{
getDayName
(
date
)}
<
/Text
>
<
View
style
=
{
isCurrentDay
?
styles
.
dayHeaderNumberContainerToday
:
{}}
>
<
Text
style
=
{[
styles
.
dayHeaderNumber
,
isCurrentDay
&&
styles
.
dayHeaderNumberToday
]}
>
{
date
.
getDate
()}
<
/Text
>
<
/View
>
<
/View
>
);
})}
<
/View
>
);
};
...
...
@@ -361,6 +385,17 @@ const styles = StyleSheet.create({
fontFamily
:
R
.
fonts
.
fontMedium
,
color
:
R
.
colors
.
black
,
},
dayHeaderNumberContainerToday
:
{
borderRadius
:
15
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
},
dayHeaderNumberToday
:
{
color
:
R
.
colors
.
blue
,
fontFamily
:
R
.
fonts
.
fontMedium
,
fontSize
:
R
.
fontsize
.
fontSizeContent
,
},
timeSlotsContainer
:
{
flex
:
1
,
backgroundColor
:
R
.
colors
.
white
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment