4949 v-model =" intervalDayInput"
5050 type =" number"
5151 min =" 1"
52- max =" 100 "
52+ max =" 28 "
5353 class =" w-full h-7 bg-[#2a2a2c] text-white border border-gray-700 rounded-md p-2 text-sm focus:border-[#336666] focus:outline-none transition-colors"
5454 :class =" !isEditActive ? 'cursor-not-allowed opacity-50' : ''"
5555 :disabled =" !isEditActive"
56- placeholder =" 1-100 "
56+ placeholder =" 1-28 "
5757 />
5858 </div >
5959 </div >
9292
9393 <button
9494 class =" col-start-1 col-span-full row-start-7 row-span-1 bg-gradient-to-r from-[#336666] to-[#4a8080] hover:from-[#4a8080] hover:to-[#336666] text-xs uppercase text-white font-medium py-1 px-4 rounded-md transition-all duration-300 ease-in-out transform hover:scale-[1.02] active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed"
95- :class =" !isEditActive ? 'cursor-not-allowed opacity-50 pointer-events-none' : ''"
96- :disabled =" !areInputsValid || !isEditActive "
95+ :class =" !areInputsValid ? 'cursor-not-allowed opacity-50 pointer-events-none' : ''"
96+ :disabled =" !areInputsValid"
9797 @click =" confirmChanges"
9898 >
9999 Confirm
@@ -113,9 +113,10 @@ const t = i18n.global.t;
113113const footerStore = useFooter ();
114114
115115const isAutoUpdateEnabled = ref (false );
116- const intervalDayInput = ref (7 );
117- const hourInput = ref (3 );
118- const minuteInput = ref (0 );
116+ const intervalDayInput = ref (1 );
117+ // set random default value for hour and minute
118+ const hourInput = ref (Math .floor (Math .random () * 3 ));
119+ const minuteInput = ref (Math .floor (Math .random () * 60 ));
119120const isChangesConfirmed = ref (false );
120121const inputMsg = ref (" " );
121122const isEditActive = ref (false );
@@ -125,7 +126,7 @@ const areInputsValid = computed(() => {
125126 return false ;
126127 }
127128
128- const dayValid = intervalDayInput .value >= 1 && intervalDayInput .value <= 100 ;
129+ const dayValid = intervalDayInput .value >= 1 && intervalDayInput .value <= 28 ;
129130 const hourValid = hourInput .value >= 0 && hourInput .value <= 23 ;
130131 const minuteValid = minuteInput .value >= 0 && minuteInput .value <= 59 ;
131132
@@ -150,8 +151,8 @@ const turnOnOff = () => {
150151
151152const confirmChanges = async () => {
152153 if (! areInputsValid .value ) {
153- if (intervalDayInput .value < 1 || intervalDayInput .value > 100 ) {
154- inputMsg .value = " Days must be between 1 and 100 " ;
154+ if (intervalDayInput .value < 1 || intervalDayInput .value > 28 ) {
155+ inputMsg .value = " Days must be between 1 and 28 " ;
155156 return ;
156157 }
157158 if (hourInput .value < 0 || hourInput .value > 23 ) {
0 commit comments